diff options
| author | bors <bors@rust-lang.org> | 2015-04-14 09:05:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-14 09:05:22 +0000 |
| commit | a9d8065633be69847e1a5b16f952467f43951b65 (patch) | |
| tree | 395f539bf223dcdf6358d7c5f3568f7652685790 | |
| parent | a4eb5a66a5b33b209a1263830d89d83381a42ccb (diff) | |
| parent | fd69ac160b7252b2acaebaae02535b3f8c27dfb7 (diff) | |
| download | rust-a9d8065633be69847e1a5b16f952467f43951b65.tar.gz rust-a9d8065633be69847e1a5b16f952467f43951b65.zip | |
Auto merge of #24408 - richo:configure-optimize-default, r=pnkfelix
Optimization is now on by default. Closes #24405
| -rwxr-xr-x | configure | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/configure b/configure index 8108e10752a..18fef588936 100755 --- a/configure +++ b/configure @@ -192,6 +192,7 @@ valopt_core() { then local UOP=$(echo $OP | tr '[:lower:]' '[:upper:]' | tr '\-' '\_') local V="CFG_${UOP}" + local V_PROVIDED="${V}_PROVIDED" eval $V="$DEFAULT" for arg in $CFG_CONFIGURE_ARGS do @@ -199,6 +200,7 @@ valopt_core() { then val=$(echo "$arg" | cut -f2 -d=) eval $V=$val + eval $V_PROVIDED=1 fi done if [ "$SAVE" = "save" ] @@ -247,8 +249,10 @@ opt_core() { if [ $DEFAULT -eq 0 ] then FLAG="enable" + DEFAULT_FLAG="disable" else FLAG="disable" + DEFAULT_FLAG="enable" DOC="don't $DOC" fi @@ -261,11 +265,19 @@ opt_core() { OP=$(echo $OP | tr 'a-z-' 'A-Z_') FLAG=$(echo $FLAG | tr 'a-z' 'A-Z') local V="CFG_${FLAG}_${OP}" + local V_PROVIDED="CFG_${FLAG}_${OP}_PROVIDED" eval $V=1 + eval $V_PROVIDED=1 if [ "$SAVE" = "save" ] then putvar $V fi + elif [ "$arg" = "--${DEFAULT_FLAG}-${OP}" ] + then + OP=$(echo $OP | tr 'a-z-' 'A-Z_') + DEFAULT_FLAG=$(echo $DEFAULT_FLAG | tr 'a-z' 'A-Z') + local V_PROVIDED="CFG_${DEFAULT_FLAG}_${OP}_PROVIDED" + eval $V_PROVIDED=1 fi done else @@ -633,8 +645,11 @@ esac # Adjust perf and debug options for debug mode if [ -n "$CFG_ENABLE_DEBUG" ]; then msg "debug mode enabled, setting performance options" - CFG_DISABLE_OPTIMIZE=1 - CFG_DISABLE_OPTIMIZE_CXX=1 + if [ -z "$CFG_ENABLE_OPTIMIZE_PROVIDED" ]; then + msg "optimization not explicitly enabled, disabling optimization" + CFG_DISABLE_OPTIMIZE=1 + CFG_DISABLE_OPTIMIZE_CXX=1 + fi CFG_ENABLE_LLVM_ASSERTIONS=1 CFG_ENABLE_DEBUG_ASSERTIONS=1 CFG_ENABLE_DEBUG_JEMALLOC=1 |
