Skip to content

Commit 40fee63

Browse files
committed
Globally disable -fno-strict-aliasing, for reasons given in the comment.
llvm-svn: 105644
1 parent 6f2e095 commit 40fee63

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

clang/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ ifdef CLANG_VENDOR
3838
CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
3939
endif
4040

41+
# Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
42+
# work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer
43+
# GCC's have false positive warnings with it on Linux (which prove a pain to
44+
# fix). For example:
45+
# http://gcc.gnu.org/PR41874
46+
# http://gcc.gnu.org/PR41838
47+
#
48+
# We can revisit this when LLVM/Clang support it.
49+
CXX.Flags += -fno-strict-aliasing
50+
4151
###
4252
# Clang Top Level specific stuff.
4353

0 commit comments

Comments
 (0)