[compiler-rt] r235928 - Introduce tsan_cxx and msan_cxx libraries (compiler-rt part).
Alexey Samsonov
vonosmas at gmail.com
Mon Apr 27 15:08:10 PDT 2015
Author: samsonov
Date: Mon Apr 27 17:08:09 2015
New Revision: 235928
URL: http://llvm.org/viewvc/llvm-project?rev=235928&view=rev
Log:
Introduce tsan_cxx and msan_cxx libraries (compiler-rt part).
For now tsan_cxx and msan_cxx contain only operator new/delete
replacements. In the future, when we add support for running UBSan+TSan
and UBSan+MSan, they will also contain bits ubsan_cxx runtime.
Modified:
compiler-rt/trunk/lib/msan/CMakeLists.txt
compiler-rt/trunk/lib/tsan/CMakeLists.txt
Modified: compiler-rt/trunk/lib/msan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/CMakeLists.txt?rev=235928&r1=235927&r2=235928&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/msan/CMakeLists.txt Mon Apr 27 17:08:09 2015
@@ -7,12 +7,15 @@ set(MSAN_RTL_SOURCES
msan_chained_origin_depot.cc
msan_interceptors.cc
msan_linux.cc
- msan_new_delete.cc
msan_report.cc
msan_thread.cc
msan_poisoning.cc
)
+set(MSAN_RTL_CXX_SOURCES
+ msan_new_delete.cc)
+
+
set(MSAN_RTL_CFLAGS ${SANITIZER_COMMON_CFLAGS})
append_no_rtti_flag(MSAN_RTL_CFLAGS)
append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE MSAN_RTL_CFLAGS)
@@ -30,11 +33,18 @@ foreach(arch ${MSAN_SUPPORTED_ARCH})
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
CFLAGS ${MSAN_RTL_CFLAGS})
- add_dependencies(msan clang_rt.msan-${arch})
- list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-${arch})
+ add_compiler_rt_runtime(clang_rt.msan_cxx-${arch} ${arch} STATIC
+ SOURCES ${MSAN_RTL_CXX_SOURCES}
+ CFLAGS ${MSAN_RTL_CFLAGS})
+ add_dependencies(msan clang_rt.msan-${arch}
+ clang_rt.msan_cxx-${arch})
+ list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-${arch}
+ clang_rt.msan_cxx-${arch})
if(UNIX)
add_sanitizer_rt_symbols(clang_rt.msan-${arch} msan.syms.extra)
- add_dependencies(msan clang_rt.msan-${arch}-symbols)
+ add_sanitizer_rt_symbols(clang_rt.msan_cxx-${arch} msan.syms.extra)
+ add_dependencies(msan clang_rt.msan-${arch}-symbols
+ clang_rt.msan_cxx-${arch}-symbols)
endif()
endforeach()
Modified: compiler-rt/trunk/lib/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/CMakeLists.txt?rev=235928&r1=235927&r2=235928&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Mon Apr 27 17:08:09 2015
@@ -30,7 +30,6 @@ set(TSAN_SOURCES
rtl/tsan_mman.cc
rtl/tsan_mutex.cc
rtl/tsan_mutexset.cc
- rtl/tsan_new_delete.cc
rtl/tsan_report.cc
rtl/tsan_rtl.cc
rtl/tsan_rtl_mutex.cc
@@ -42,6 +41,9 @@ set(TSAN_SOURCES
rtl/tsan_symbolize.cc
rtl/tsan_sync.cc)
+set(TSAN_CXX_SOURCES
+ rtl/tsan_new_delete.cc)
+
if(APPLE)
list(APPEND TSAN_SOURCES rtl/tsan_platform_mac.cc)
elseif(UNIX)
@@ -105,12 +107,18 @@ if(UNIX AND NOT APPLE)
$<TARGET_OBJECTS:RTInterception.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
- CFLAGS ${TSAN_RTL_CFLAGS}
- DEFS ${TSAN_COMMON_DEFINITIONS})
- list(APPEND TSAN_RUNTIME_LIBRARIES clang_rt.tsan-${arch})
+ CFLAGS ${TSAN_RTL_CFLAGS})
+ add_compiler_rt_runtime(clang_rt.tsan_cxx-${arch} ${arch} STATIC
+ SOURCES ${TSAN_CXX_SOURCES}
+ CFLAGS ${TSAN_RTL_CFLAGS})
+ list(APPEND TSAN_RUNTIME_LIBRARIES clang_rt.tsan-${arch}
+ clang_rt.tsan_cxx-${arch})
add_sanitizer_rt_symbols(clang_rt.tsan-${arch} rtl/tsan.syms.extra)
+ add_sanitizer_rt_symbols(clang_rt.tsan_cxx-${arch} rtl/tsan.syms.extra)
add_dependencies(tsan clang_rt.tsan-${arch}
- clang_rt.tsan-${arch}-symbols)
+ clang_rt.tsan_cxx-${arch}
+ clang_rt.tsan-${arch}-symbols
+ clang_rt.tsan_cxx-${arch}-symbols)
endforeach()
endif()
More information about the llvm-commits
mailing list