summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/CMakeLists.txt
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
commit7a3d5fe086a6458be7c4810397363b67b022a138 (patch)
tree0ac697982541b6074be688c5de2e51d203b2bb91 /lib/sanitizer_common/CMakeLists.txt
parenta8b4c3b6809a4cdc10587020b98246c171bc18ee (diff)
downloadcompiler-rt-7a3d5fe086a6458be7c4810397363b67b022a138.tar.gz
compiler-rt-7a3d5fe086a6458be7c4810397363b67b022a138.tar.bz2
compiler-rt-7a3d5fe086a6458be7c4810397363b67b022a138.tar.xz
[Sanitizer] build sanitizer_common library with -Wglobal-constructors
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/CMakeLists.txt')
-rw-r--r--lib/sanitizer_common/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
index 3aa56b1f..54760cb4 100644
--- a/lib/sanitizer_common/CMakeLists.txt
+++ b/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.