aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-04-20 22:16:40 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-04-20 22:16:40 +0000
commitb306e38a2e00eccb2b6cca176ce71385fb4a77f9 (patch)
treee30f05d0f983b01ba0c011f0950d0059f8358f7c /Makefile.rules
parenta7f2a9e69fc53920640c4707cc8c4045d9ea7db9 (diff)
downloadexternal_llvm-b306e38a2e00eccb2b6cca176ce71385fb4a77f9.zip
external_llvm-b306e38a2e00eccb2b6cca176ce71385fb4a77f9.tar.gz
external_llvm-b306e38a2e00eccb2b6cca176ce71385fb4a77f9.tar.bz2
One Mac OS X, just build with -O3 but without -fstrict-aliasing (which is kinda broken).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules20
1 files changed, 11 insertions, 9 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 192f887..9324fe6 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -229,12 +229,12 @@ endif
CPP.Defines :=
# OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
# this can be overridden on the make command line.
-# Avoid -O3 on Darwin, there are unresolved issues with
-# -fstrict-aliasing and ipa-type-escape radr://6756684
-ifeq ($(OS), $(filter $(OS), MingW Darwin))
- OPTIMIZE_OPTION := -O2
-else
- OPTIMIZE_OPTION := -O3
+ifndef OPTIMIZE_OPTION
+ ifneq ($(OS),MingW)
+ OPTIMIZE_OPTION := -O3
+ else
+ OPTIMIZE_OPTION := -O2
+ endif
endif
ifeq ($(ENABLE_OPTIMIZED),1)
@@ -247,9 +247,11 @@ ifeq ($(ENABLE_OPTIMIZED),1)
endif
# Darwin requires -fstrict-aliasing to be explicitly enabled.
- ifeq ($(OS),Darwin)
- EXTRA_OPTIONS += -fstrict-aliasing -Wstrict-aliasing
- endif
+ # Avoid -O3 on Darwin for now, there are unresolved issues with
+ # -fstrict-aliasing and ipa-type-escape radr://6756684
+ #ifeq ($(OS),Darwin)
+ # EXTRA_OPTIONS += -fstrict-aliasing -Wstrict-aliasing
+ #endif
CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer)
C.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer)
LD.Flags += $(OPTIMIZE_OPTION)