mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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
This commit is contained in:
parent
f07ddcd38b
commit
d63b964850
@ -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
Block a user