diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-04-20 22:16:40 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-04-20 22:16:40 +0000 |
commit | 107dae185f09e0a6fba76cf9762dde9f2ef03bb2 (patch) | |
tree | e30f05d0f983b01ba0c011f0950d0059f8358f7c | |
parent | f7ea85d7681ab35a4c216dd8a7ff4063e3634da0 (diff) | |
download | external_llvm-107dae185f09e0a6fba76cf9762dde9f2ef03bb2.zip external_llvm-107dae185f09e0a6fba76cf9762dde9f2ef03bb2.tar.gz external_llvm-107dae185f09e0a6fba76cf9762dde9f2ef03bb2.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
-rw-r--r-- | Makefile.rules | 20 | ||||
-rwxr-xr-x | utils/buildit/build_llvm | 2 |
2 files changed, 12 insertions, 10 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) diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index 450bfea..eac68b4 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -161,7 +161,7 @@ cd $DIR/obj-llvm || exit 1 make $LOCAL_MAKEFLAGS $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$TARGETS" \ LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \ LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \ - OPTIMIZE_OPTION='-O2' VERBOSE=1 install + OPTIMIZE_OPTION='-O3' VERBOSE=1 install if ! test $? == 0 ; then echo "error: LLVM 'make install' failed!" |