diff options
| author | Alexey Samsonov <samsonov@google.com> | 2013-08-29 12:08:36 +0000 |
|---|---|---|
| committer | Alexey Samsonov <samsonov@google.com> | 2013-08-29 12:08:36 +0000 |
| commit | 06379b35373e0ca9561c130284104fbdf0295f79 (patch) | |
| tree | c3a36b15220016471d3d3f9f450120970c0d8ba7 /compiler-rt/lib/tsan | |
| parent | 980c6b08b195c5ee6a7b30723f62f1731c42ed61 (diff) | |
| download | bcm5719-llvm-06379b35373e0ca9561c130284104fbdf0295f79.tar.gz bcm5719-llvm-06379b35373e0ca9561c130284104fbdf0295f79.zip | |
[TSan] Add a couple of compiler warnings to TSan runtime compile flags
llvm-svn: 189581
Diffstat (limited to 'compiler-rt/lib/tsan')
| -rw-r--r-- | compiler-rt/lib/tsan/CMakeLists.txt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler-rt/lib/tsan/CMakeLists.txt b/compiler-rt/lib/tsan/CMakeLists.txt index 7638ec8108d..fc1944b02fa 100644 --- a/compiler-rt/lib/tsan/CMakeLists.txt +++ b/compiler-rt/lib/tsan/CMakeLists.txt @@ -8,10 +8,14 @@ set(TSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS} -fPIE -fno-rtti) -# FIXME: Add support for compile flags: -# -Wframe-larger-than=512, -# -Wglobal-constructors, -# --sysroot=. + +set(TSAN_RTL_CFLAGS + ${TSAN_CFLAGS} + -Wframe-larger-than=512) +if(SUPPORTS_GLOBAL_CONSTRUCTORS_FLAG) + list(APPEND TSAN_RTL_CFLAGS -Wglobal-constructors) +endif() +# FIXME: Add support for --sysroot=. compile flag: if("${CMAKE_BUILD_TYPE}" EQUAL "Release") set(TSAN_COMMON_DEFINITIONS DEBUG=0) @@ -64,7 +68,7 @@ if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE) $<TARGET_OBJECTS:RTInterception.${arch}> $<TARGET_OBJECTS:RTSanitizerCommon.${arch}> $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> - CFLAGS ${TSAN_CFLAGS} + CFLAGS ${TSAN_RTL_CFLAGS} DEFS ${TSAN_COMMON_DEFINITIONS}) add_sanitizer_rt_symbols(clang_rt.tsan-${arch} rtl/tsan.syms.extra) list(APPEND TSAN_RUNTIME_LIBRARIES clang_rt.tsan-${arch} |

