[compiler-rt] r176940 - [Sanitizer] Build ASan, TSan and MSan runtimes with -fno-rtti.
Alexey Samsonov
samsonov at google.com
Wed Mar 13 02:18:30 PDT 2013
Author: samsonov
Date: Wed Mar 13 04:18:30 2013
New Revision: 176940
URL: http://llvm.org/viewvc/llvm-project?rev=176940&view=rev
Log:
[Sanitizer] Build ASan, TSan and MSan runtimes with -fno-rtti.
Modified:
compiler-rt/trunk/lib/asan/CMakeLists.txt
compiler-rt/trunk/lib/msan/CMakeLists.txt
compiler-rt/trunk/lib/tsan/CMakeLists.txt
compiler-rt/trunk/make/platform/clang_darwin.mk
compiler-rt/trunk/make/platform/clang_linux.mk
Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=176940&r1=176939&r2=176940&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/CMakeLists.txt Wed Mar 13 04:18:30 2013
@@ -30,7 +30,9 @@ set(ASAN_DYLIB_SOURCES
include_directories(..)
-set(ASAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
+set(ASAN_CFLAGS
+ ${SANITIZER_COMMON_CFLAGS}
+ -fno-rtti)
set(ASAN_COMMON_DEFINITIONS
ASAN_HAS_EXCEPTIONS=1)
Modified: compiler-rt/trunk/lib/msan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/CMakeLists.txt?rev=176940&r1=176939&r2=176940&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/msan/CMakeLists.txt Wed Mar 13 04:18:30 2013
@@ -11,6 +11,7 @@ set(MSAN_RTL_SOURCES
)
set(MSAN_RTL_CFLAGS
${SANITIZER_COMMON_CFLAGS}
+ -fno-rtti
-fPIE
# Prevent clang from generating libc calls.
-ffreestanding)
Modified: compiler-rt/trunk/lib/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/CMakeLists.txt?rev=176940&r1=176939&r2=176940&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Wed Mar 13 04:18:30 2013
@@ -2,7 +2,9 @@
include_directories(..)
-set(TSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
+set(TSAN_CFLAGS
+ ${SANITIZER_COMMON_CFLAGS}
+ -fno-rtti)
# FIXME: Add support for compile flags:
# -Wframe-larger-than=512,
# -Wglobal-constructors,
Modified: compiler-rt/trunk/make/platform/clang_darwin.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_darwin.mk?rev=176940&r1=176939&r2=176940&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/clang_darwin.mk (original)
+++ compiler-rt/trunk/make/platform/clang_darwin.mk Wed Mar 13 04:18:30 2013
@@ -132,7 +132,7 @@ CFLAGS.eprintf := $(CFLAGS) $(OSX_DEPLO
CFLAGS.10.4 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
# FIXME: We can't build ASAN with our stub SDK yet.
CFLAGS.asan_osx := $(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin \
- -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
+ -fno-rtti -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
CFLAGS.asan_osx_dynamic := \
$(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin \
-DMAC_INTERPOSE_FUNCTIONS=1 \
Modified: compiler-rt/trunk/make/platform/clang_linux.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_linux.mk?rev=176940&r1=176939&r2=176940&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/clang_linux.mk (original)
+++ compiler-rt/trunk/make/platform/clang_linux.mk Wed Mar 13 04:18:30 2013
@@ -86,12 +86,12 @@ CFLAGS.full-i386 := $(CFLAGS) -m32
CFLAGS.full-x86_64 := $(CFLAGS) -m64
CFLAGS.profile-i386 := $(CFLAGS) -m32
CFLAGS.profile-x86_64 := $(CFLAGS) -m64
-CFLAGS.asan-i386 := $(CFLAGS) -m32 -fPIE -fno-builtin \
+CFLAGS.asan-i386 := $(CFLAGS) -m32 -fPIE -fno-builtin -fno-rtti \
-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
-CFLAGS.asan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin \
+CFLAGS.asan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin -fno-rtti \
-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
-CFLAGS.tsan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin
-CFLAGS.msan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin
+CFLAGS.tsan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin -fno-rtti
+CFLAGS.msan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin -fno-rtti
CFLAGS.ubsan-i386 := $(CFLAGS) -m32 -fPIE -fno-builtin
CFLAGS.ubsan-x86_64 := $(CFLAGS) -m64 -fPIE -fno-builtin
More information about the llvm-commits
mailing list