summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-09-11 09:57:15 +0000
committerAlexey Samsonov <samsonov@google.com>2013-09-11 09:57:15 +0000
commit279283c0649ab6e10c44a61ab6c6bc5c161c64ce (patch)
treef59a0d84174c4b3e64a15ea0d7e8e7a22317d792
parente99a0b9b7692c5b9f8da0202093d7c13b6dda76e (diff)
downloadbcm5719-llvm-279283c0649ab6e10c44a61ab6c6bc5c161c64ce.tar.gz
bcm5719-llvm-279283c0649ab6e10c44a61ab6c6bc5c161c64ce.zip
[Sanitizer] build sanitizer_common library with -Wglobal-constructors
llvm-svn: 190504
-rw-r--r--compiler-rt/lib/sanitizer_common/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/CMakeLists.txt
index 3aa56b1f655..54760cb4c4f 100644
--- a/compiler-rt/lib/sanitizer_common/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/CMakeLists.txt
@@ -67,6 +67,10 @@ else()
/GR-)
endif()
+if(SUPPORTS_GLOBAL_CONSTRUCTORS_FLAG)
+ list(APPEND SANITIZER_CFLAGS -Wglobal-constructors)
+endif()
+
set(SANITIZER_RUNTIME_LIBRARIES)
if(APPLE)
# Build universal binary on APPLE.
OpenPOWER on IntegriCloud