diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-04 04:32:50 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-04 04:32:50 +0000 |
commit | ca58fd8d29aa31703adf240118e6031be84c3808 (patch) | |
tree | d63045d6979fb8adc0049d77931230a5b55e3201 /autoconf | |
parent | 3072a0705d8acd8aad61b8591362367c428a3c19 (diff) | |
download | external_llvm-ca58fd8d29aa31703adf240118e6031be84c3808.zip external_llvm-ca58fd8d29aa31703adf240118e6031be84c3808.tar.gz external_llvm-ca58fd8d29aa31703adf240118e6031be84c3808.tar.bz2 |
configure: Add --with-optimize-option, for setting the default value of
OPTIMIZE_OPTION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 794326d..7d0a9bb 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -607,6 +607,23 @@ if test -n "$LLVMGXX" && test -z "$LLVMGCC"; then AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]); fi +dnl Override the option to use for optimized builds. +AC_ARG_WITH(optimize-option, + AS_HELP_STRING([--with-optimize-option], + [Select the compiler options to use for optimized builds]),, + withval=default) +AC_MSG_CHECKING([optimization flags]) +case "$withval" in + default) + case "$llvm_cv_os_type" in + MingW) optimize_option=-O3 ;; + *) optimize_option=-O2 ;; + esac ;; + *) optimize_option="$withval" ;; +esac +AC_SUBST(OPTIMIZE_OPTION,$optimize_option) +AC_MSG_RESULT([$optimize_option]) + dnl Specify extra build options AC_ARG_WITH(extra-options, AS_HELP_STRING([--with-extra-options], |