diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-24 23:02:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-24 23:02:40 +0000 |
commit | d63b964850f7051a7a96edd5aa31d9d67edbec68 (patch) | |
tree | 84b439a2a6965595c340e166e6a164dfd996b5a2 | |
parent | f07ddcd38b7a4d7afc62960a20b0fc16b86ff81d (diff) |
Abstract out the current optimization level into a flag that can be overridden
on the make line, to avoid bugs in native compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28457 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile.rules | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile.rules b/Makefile.rules index c4148be9db..ac4a6fd66e 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -198,11 +198,15 @@ install-bytecode:: install-bytecode-local # Variables derived from configuration we are building #-------------------------------------------------------------------- +# OPTIMIZE_OPTION - The optimization level option we want to build LLVM with +# this can be overridden on the make command line. +OPTIMIZE_OPTION := -O3 + ifdef ENABLE_PROFILING BuildMode := Profile - CXX.Flags := -O3 -pg - C.Flags := -O3 -pg - LD.Flags := -O3 -pg + CXX.Flags := $(OPTIMIZE_OPTION) -pg + C.Flags := $(OPTIMIZE_OPTION) -pg + LD.Flags := $(OPTIMIZE_OPTION) -pg else ifdef ENABLE_OPTIMIZED BuildMode := Release @@ -213,9 +217,9 @@ else OmitFramePointer := -fomit-frame-pointer endif endif - CXX.Flags := -O3 $(OmitFramePointer) - C.Flags := -O3 $(OmitFramePointer) - LD.Flags := -O3 + CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer) + C.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer) + LD.Flags := $(OPTIMIZE_OPTION) else BuildMode := Debug CXX.Flags := -g |