]> git.lizzy.rs Git - rust.git/blobdiff - configure
Auto merge of #27856 - nikomatsakis:move-def-id-to-rustc, r=eddyb
[rust.git] / configure
index cf349af6488359d72bf03fe5dbb42e19d792a342..dc9d7d75310c6b795d87259eb40c4f8637456860 100755 (executable)
--- a/configure
+++ b/configure
@@ -607,6 +607,10 @@ valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
 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"
@@ -1005,11 +1009,9 @@ then
         (''|*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/')
@@ -1430,9 +1432,10 @@ do
         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