diff options
| author | bors <bors@rust-lang.org> | 2013-07-31 11:10:20 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-31 11:10:20 -0700 |
| commit | e07e49ea8fa0c0666a1b59ff1238f995ce84722c (patch) | |
| tree | 2fa0975f2ec2a98cf6cb1e82cbb64681a18860c6 | |
| parent | 389aba09523f805e3b493a5089c6397749b06b67 (diff) | |
| parent | 02f7f72a9af16607f9c08989fe56d417842a24dd (diff) | |
| download | rust-e07e49ea8fa0c0666a1b59ff1238f995ce84722c.tar.gz rust-e07e49ea8fa0c0666a1b59ff1238f995ce84722c.zip | |
auto merge of #8147 : dotdash/rust/assertion_option, r=pcwalton
Builds are considerably faster without assertions, so when working on e.g. libstd, which doesn't directly interact with LLVM, one might want to disable them.
| -rwxr-xr-x | configure | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/configure b/configure index 30ba2f237ec..609a7c46e36 100755 --- a/configure +++ b/configure @@ -371,6 +371,7 @@ 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" @@ -793,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" @@ -836,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") |
