]> git.lizzy.rs Git - rust.git/blobdiff - configure
auto merge of #8357 : omasanori/rust/cleanup, r=alexcrichton
[rust.git] / configure
index 8f757a0715f8cb0266bd1ff6adb86bc4b9f09383..609a7c46e36d8f0945f9a20818581ce2b00a9e01 100755 (executable)
--- a/configure
+++ b/configure
@@ -371,7 +371,9 @@ opt docs     1 "build documentation"
 opt optimize 1 "build optimized rust code"
 opt optimize-cxx 1 "build optimized C++ code"
 opt optimize-llvm 1 "build optimized LLVM"
+opt llvm-assertions 1 "build LLVM with assertions"
 opt debug 0 "build with extra debug fun"
+opt ratchet-bench 0 "ratchet benchmarks"
 opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
 opt manage-submodules 1 "let the build manage the git submodules"
 opt mingw-cross 0 "cross-compile for win32 using mingw"
@@ -749,18 +751,18 @@ then
     cd ${CFG_SRC_DIR}
 
     msg "git: submodule sync"
-    "${CFG_GIT}" submodule --quiet sync
+    "${CFG_GIT}" submodule sync
 
     msg "git: submodule update"
-    "${CFG_GIT}" submodule --quiet update --init
+    "${CFG_GIT}" submodule update --init
     need_ok "git failed"
 
     msg "git: submodule foreach sync"
-    "${CFG_GIT}" submodule --quiet foreach --recursive 'if test -e .gitmodules; then git submodule sync; fi'
+    "${CFG_GIT}" submodule foreach --recursive 'if test -e .gitmodules; then git submodule sync; fi'
     need_ok "git failed"
 
     msg "git: submodule foreach update"
-    "${CFG_GIT}" submodule --quiet update --init --recursive
+    "${CFG_GIT}" submodule update --init --recursive
     need_ok "git failed"
 
     # NB: this is just for the sake of getting the submodule SHA1 values
@@ -769,9 +771,9 @@ then
     "${CFG_GIT}" submodule status --recursive
 
     msg "git: submodule clobber"
-    "${CFG_GIT}" submodule --quiet foreach --recursive git clean -dxf
+    "${CFG_GIT}" submodule foreach --recursive git clean -dxf
     need_ok "git failed"
-    "${CFG_GIT}" submodule --quiet foreach --recursive git checkout .
+    "${CFG_GIT}" submodule foreach --recursive git checkout .
     need_ok "git failed"
 
     cd ${CFG_BUILD_DIR}
@@ -792,10 +794,17 @@ do
             LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
             # Just use LLVM straight from its build directory to
             # avoid 'make install' time
-            LLVM_INST_DIR=$LLVM_BUILD_DIR/Debug+Asserts
+            LLVM_INST_DIR=$LLVM_BUILD_DIR/Debug
         else
             LLVM_DBG_OPTS="--enable-optimized"
-            LLVM_INST_DIR=$LLVM_BUILD_DIR/Release+Asserts
+            LLVM_INST_DIR=$LLVM_BUILD_DIR/Release
+        fi
+        if [ ! -z "$CFG_DISABLE_LLVM_ASSERTIONS" ]
+        then
+            LLVM_ASSERTION_OPTS="--disable-assertions"
+        else
+            LLVM_ASSERTION_OPTS="--enable-assertions"
+            LLVM_INST_DIR=${LLVM_INST_DIR}+Asserts
         fi
     else
         msg "not reconfiguring LLVM, external LLVM root"
@@ -835,7 +844,7 @@ do
         LLVM_TARGET="--target=$t"
 
         # Disable unused LLVM features
-        LLVM_OPTS="$LLVM_DBG_OPTS --disable-docs --enable-bindings=none"
+        LLVM_OPTS="$LLVM_DBG_OPTS $LLVM_ASSERTION_OPTS --disable-docs --enable-bindings=none"
 
         case "$CFG_C_COMPILER" in
             ("ccache clang")
@@ -920,9 +929,6 @@ do
         esac
         need_ok "LLVM configure failed"
 
-        # Hack the tools Makefile to turn off the clang build
-        sed -i 's/clang//g' tools/Makefile
-
         cd $CFG_BUILD_DIR
     fi