[TSan] Build TSan runtime with -fPIE.

This removes all register spills from the performance-critical __tsan_{read,write}{1,2,4,8} functions when the host compiler is GCC.

llvm-svn: 178340
This commit is contained in:
Alexander Potapenko 2013-03-29 09:44:11 +00:00
parent 389b45061f
commit b042555cd3
1 changed files with 3 additions and 0 deletions

View File

@ -2,8 +2,11 @@
include_directories(..)
# SANITIZER_COMMON_CFLAGS contains -fPIC, but it's performance-critical for
# TSan runtime to be built with -fPIE to reduce the number of register spills.
set(TSAN_CFLAGS
${SANITIZER_COMMON_CFLAGS}
-fPIE
-fno-rtti)
# FIXME: Add support for compile flags:
# -Wframe-larger-than=512,