valopt release-channel "dev" "the name of the release channel to build"
valopt musl-root "/usr/local" "MUSL root installation directory"
+# Used on systems where "cc" and "ar" are unavailable
+valopt default-linker "cc" "the default linker"
+valopt default-ar "ar" "the default ar"
+
# Many of these are saved below during the "writing configuration" step
# (others are conditionally saved).
opt_nosave manage-submodules 1 "let the build manage the git submodules"
(''|*clang)
CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
- if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
- then
+ if echo $CFG_CLANG_REPORTED_VERSION | grep -q "(based on LLVM "; then
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
- elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
- then
+ elif echo $CFG_CLANG_REPORTED_VERSION | grep -q "Apple LLVM"; then
CFG_OSX_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
else
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
LLVM_BUILD_DIR=
LLVM_INST_DIR=$CFG_LLVM_ROOT
do_reconfigure=0
+ # Check that LLVm FileCheck is available. Needed for the tests
+ need_cmd $LLVM_INST_DIR/bin/FileCheck
fi
-
if [ ${do_reconfigure} -ne 0 ]
then
# because git is hilarious, it might have put the module index