diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-12-11 12:27:27 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-12-11 12:27:27 +0000 |
commit | 78c56c3c407d2c92825c86e6af7a0230d6019a1c (patch) | |
tree | 808c7192ad93fb80b58a7b32ab855fa21961e31e /lib/msan/CMakeLists.txt | |
parent | 8416e2110049d4f53f790b2486c6f1add6729ea4 (diff) |
[msan] MemorySanitizer runtime.
Initial commit of the MemorySanitizer runtime library.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/CMakeLists.txt')
-rw-r--r-- | lib/msan/CMakeLists.txt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/msan/CMakeLists.txt b/lib/msan/CMakeLists.txt new file mode 100644 index 000000000..bd4a50ffa --- /dev/null +++ b/lib/msan/CMakeLists.txt @@ -0,0 +1,35 @@ +# Build for the MemorySanitizer runtime support library. + +set(MSAN_SOURCES + msan.cc + msan_allocator.cc + msan_interceptors.cc + msan_linux.cc + msan_new_delete.cc + msan_platform_limits_posix.cc + ) + +include_directories(..) + +set(MSAN_CFLAGS + ${SANITIZER_COMMON_CFLAGS} + -fPIE + -ffreestanding + -g + -fno-omit-frame-pointer) +set(MSAN_COMMON_DEFINITIONS) + +set(MSAN_RUNTIME_LIBRARIES) +add_library(clang_rt.msan-x86_64 STATIC + ${MSAN_SOURCES} + $<TARGET_OBJECTS:RTInterception.x86_64> + $<TARGET_OBJECTS:RTSanitizerCommon.x86_64> + ) +set_target_compile_flags(clang_rt.msan-x86_64 + ${MSAN_CFLAGS} ${TARGET_X86_64_CFLAGS} + ) +list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-x86_64) + +set_property(TARGET ${MSAN_RUNTIME_LIBRARIES} APPEND PROPERTY + COMPILE_DEFINITIONS ${MSAN_COMMON_DEFINITIONS}) +add_clang_compiler_rt_libraries(${MSAN_RUNTIME_LIBRARIES}) |