diff options
author | Tarek Soliman | 2011-10-08 14:00:40 -0500 |
---|---|---|
committer | Tarek Soliman | 2011-10-09 14:48:53 -0500 |
commit | dc473ce955b6cbcb34c94793027fb0556cabe72c (patch) | |
tree | 2a4929b5b6ece963e18ce5488c012e5c17776e35 /configure | |
parent | 01f03e2a3ecfbe9a7a0b8dccb85239d0733d8113 (diff) | |
download | scummvm-rg350-dc473ce955b6cbcb34c94793027fb0556cabe72c.tar.gz scummvm-rg350-dc473ce955b6cbcb34c94793027fb0556cabe72c.tar.bz2 scummvm-rg350-dc473ce955b6cbcb34c94793027fb0556cabe72c.zip |
CONFIGURE: Enable release optimizations by default when optimization...
... level is specified
This preserves the old behavior of ports that used to always pass in -Os or -O3
It also allows --disable-release-optimization for those ports to function
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -174,7 +174,8 @@ _plugins_default=static _plugin_prefix= _plugin_suffix= _nasm=auto -_optimization_level=-O2 +_optimization_level= +_default_optimization_level=-O2 # Default commands _ranlib=ranlib _strip=strip @@ -2708,10 +2709,23 @@ echo_n "Checking whether to have a verbose build... " echo "$_verbose_build" add_to_config_mk_if_yes "$_verbose_build" 'VERBOSE_BUILD = 1' + +# +# If a specific optimization level was requested, enable release optimization +# +if test -n "$_optimization_level" ; then + # Ports will specify an optimization level and expect that to be enabled + if test "$_release_optimization" != no ; then + _release_optimization=yes + fi +else + _optimization_level=$_default_optimization_level +fi + # # Check whether to enable release optimization # -if test "$_release_optimization" = yes; then +if test "$_release_optimization" = yes ; then # Enable optimizations. This also # makes it possible to use -Wuninitialized, so let's do that. CXXFLAGS="$CXXFLAGS $_optimization_level" |