diff options
author | Alexander Potapenko <glider@google.com> | 2013-03-29 09:44:11 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2013-03-29 09:44:11 +0000 |
commit | 76030b30c53e7003b17c85f2bbbca976da63bbe1 (patch) | |
tree | 090d27261f19bd7a396103f78120b165edebf0a7 /lib/tsan/CMakeLists.txt | |
parent | f5225d5f82525abad202997ffce19dfc3023c5ed (diff) | |
download | compiler-rt-76030b30c53e7003b17c85f2bbbca976da63bbe1.tar.gz compiler-rt-76030b30c53e7003b17c85f2bbbca976da63bbe1.tar.bz2 compiler-rt-76030b30c53e7003b17c85f2bbbca976da63bbe1.tar.xz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/CMakeLists.txt')
-rw-r--r-- | lib/tsan/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tsan/CMakeLists.txt b/lib/tsan/CMakeLists.txt index ef4b6102..28288956 100644 --- a/lib/tsan/CMakeLists.txt +++ b/lib/tsan/CMakeLists.txt @@ -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, |