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"
step_msg "looking for build programs"
probe_need CFG_PERL perl
-probe_need CFG_CURL curl
+probe_need CFG_CURLORWGET curl wget
probe_need CFG_PYTHON python2.7 python2.6 python2 python
python_version=$($CFG_PYTHON -V 2>&1)
make_dir $h/test/perf
make_dir $h/test/pretty
make_dir $h/test/debug-info
+ make_dir $h/test/codegen
make_dir $h/test/doc-tutorial
make_dir $h/test/doc-tutorial-ffi
make_dir $h/test/doc-tutorial-macros
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
"${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}
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"
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")
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