Abstract out the current optimization level into a flag that can be overridden
on the make line, to avoid bugs in native compilers. llvm-svn: 28457
This commit is contained in:
parent
d36c0fdf2e
commit
213a85b43c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue