summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2013-03-29 09:44:11 +0000
committerAlexander Potapenko <glider@google.com>2013-03-29 09:44:11 +0000
commitb042555cd3d30be2549db4e4a0ec2cf2aaacc1ea (patch)
tree3cf19b9dae4f5a0e150a289aec4e6ba39fe65b2a
parent389b45061f2a41ccbcf51cff043d4ac16c2d30a3 (diff)
downloadbcm5719-llvm-b042555cd3d30be2549db4e4a0ec2cf2aaacc1ea.tar.gz
bcm5719-llvm-b042555cd3d30be2549db4e4a0ec2cf2aaacc1ea.zip
[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
-rw-r--r--compiler-rt/lib/tsan/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/CMakeLists.txt b/compiler-rt/lib/tsan/CMakeLists.txt
index ef4b6102e55..28288956750 100644
--- a/compiler-rt/lib/tsan/CMakeLists.txt
+++ b/compiler-rt/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,
OpenPOWER on IntegriCloud