[build] only download clang if it is needed

Summary:
Make sure that we only download the clang tarballs needed to build clang
if:
1. clang is not installed
2. the user intends to build clang

Reviewed By: martintrojer

Differential Revision: D24137085

fbshipit-source-id: bfea1bf02
master
Jules Villard 4 years ago committed by Facebook GitHub Bot
parent fb080ac0cc
commit 4a1c513d4e

@ -165,7 +165,6 @@ fi
./configure $INFER_CONFIGURE_OPTS
if [ "$BUILD_CLANG" == "yes" ]; then
facebook-clang-plugins/clang/src/prepare_clang_src.sh
if ! facebook-clang-plugins/clang/setup.sh --only-check-install; then
echo ""
echo " Warning: you are not using a release of Infer. The C and"
@ -195,6 +194,9 @@ if [ "$BUILD_CLANG" == "yes" ]; then
if [ "x$confirm" != "xy" ]; then
exit 0
fi
# only run this script if we are definitely building clang
facebook-clang-plugins/clang/src/prepare_clang_src.sh
fi
fi

Loading…
Cancel
Save