diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-12-25 12:39:56 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-12-25 12:39:56 +0000 |
commit | 0231c50f42e735739041f3b4b4ce17e1742bed69 (patch) | |
tree | ecbef2c2cc839771ee6fa59694daef1ab675cafc /lib/msan/CMakeLists.txt | |
parent | 97edeb3e6270b05cb3ece0d5b6f0ea1f0ba1398a (diff) |
MemorySanitizer unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/CMakeLists.txt')
-rw-r--r-- | lib/msan/CMakeLists.txt | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/msan/CMakeLists.txt b/lib/msan/CMakeLists.txt index bd4a50ffa..44b00695a 100644 --- a/lib/msan/CMakeLists.txt +++ b/lib/msan/CMakeLists.txt @@ -1,6 +1,7 @@ -# Build for the MemorySanitizer runtime support library. +include_directories(..) -set(MSAN_SOURCES +# Runtime library sources and build flags. +set(MSAN_RTL_SOURCES msan.cc msan_allocator.cc msan_interceptors.cc @@ -8,28 +9,26 @@ set(MSAN_SOURCES msan_new_delete.cc msan_platform_limits_posix.cc ) - -include_directories(..) - -set(MSAN_CFLAGS +set(MSAN_RTL_CFLAGS ${SANITIZER_COMMON_CFLAGS} -fPIE - -ffreestanding - -g - -fno-omit-frame-pointer) -set(MSAN_COMMON_DEFINITIONS) + # Prevent clang from generating libc calls. + -ffreestanding) +# Static runtime library. set(MSAN_RUNTIME_LIBRARIES) add_library(clang_rt.msan-x86_64 STATIC - ${MSAN_SOURCES} + ${MSAN_RTL_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} + ${MSAN_RTL_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}) + +if(LLVM_INCLUDE_TESTS) + add_subdirectory(tests) +endif() |