Skip to content

Commit

Permalink
Pass -fstrict-aliasing to the compiler when building a release build …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
lattner committed Jul 27, 2006
1 parent b4e80f8 commit 16620fc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 16620fc

Please sign in to comment.