diff options
author | Chris Lattner <sabre@nondot.org> | 2006-07-27 18:19:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-07-27 18:19:51 +0000 |
commit | 16620fcbfd12fcd0530e79e121a7e5ff33cb9618 (patch) | |
tree | 1c6d1da930735d45f20b5678e7d1ba09ab1427d1 /Makefile.rules | |
parent | b4e80f8857ec40c6823f1f6bfa58bf920c05bf0d (diff) |
Pass -fstrict-aliasing to the compiler when building a release build on darwin.
Darwin doesn't default to it being on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29350 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile.rules b/Makefile.rules index 6341c7553c..3fe8090c9b 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -214,13 +214,18 @@ ifdef ENABLE_PROFILING else ifdef ENABLE_OPTIMIZED BuildMode := Release - # Don't use -fomit-frame-pointer on FreeBSD + # Don't use -fomit-frame-pointer on Darwin or FreeBSD. ifneq ($(OS),FreeBSD) - # Don't use -fomit-frame-pointer on Darwin, it breaks backtraces. ifneq ($(OS),Darwin) OmitFramePointer := -fomit-frame-pointer endif endif + + # Darwin requires -fstrict-aliasing to be explicitly enabled. + ifeq ($(OS),Darwin) + EXTRA_OPTIONS += -fstrict-aliasing + endif + CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer) C.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer) LD.Flags := $(OPTIMIZE_OPTION) @@ -251,7 +256,7 @@ LD.Flags += $(LDFLAGS) AR.Flags := cru LibTool.Flags := --tag=CXX -#Make Floating point ieee complient on alpha +# Make Floating point IEEE compliant on Alpha. ifeq ($(ARCH),Alpha) CXX.Flags += -mieee -fPIC CPP.BaseFlags += -mieee -fPIC |