summaryrefslogtreecommitdiff
path: root/lib/lsan/CMakeLists.txt
diff options
context:
space:
mode:
authorSergey Matveev <earthdok@google.com>2013-05-20 11:13:33 +0000
committerSergey Matveev <earthdok@google.com>2013-05-20 11:13:33 +0000
commitf484ff329597a307b51bd4af308d87f18fd3c2cb (patch)
tree595fb59b9b48322cf2b1c3e77ea419b37682e350 /lib/lsan/CMakeLists.txt
parentfc98a1acf56088cfb2226718f8d1d8f0034457d4 (diff)
downloadcompiler-rt-f484ff329597a307b51bd4af308d87f18fd3c2cb.tar.gz
compiler-rt-f484ff329597a307b51bd4af308d87f18fd3c2cb.tar.bz2
compiler-rt-f484ff329597a307b51bd4af308d87f18fd3c2cb.tar.xz
[lsan] CMakeLists and lit test configs for LSan.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/CMakeLists.txt')
-rw-r--r--lib/lsan/CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/lsan/CMakeLists.txt b/lib/lsan/CMakeLists.txt
new file mode 100644
index 00000000..73b96a2e
--- /dev/null
+++ b/lib/lsan/CMakeLists.txt
@@ -0,0 +1,26 @@
+include_directories(..)
+
+set(LSAN_CFLAGS
+ ${SANITIZER_COMMON_CFLAGS})
+
+set(LSAN_SOURCES
+ lsan_interceptors.cc
+ lsan_allocator.cc
+ lsan_thread.cc
+ lsan.cc
+ lsan_common.cc
+ lsan_common_linux.cc)
+
+set(LSAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+
+set(LSAN_RUNTIME_LIBRARIES)
+set(arch "x86_64")
+add_compiler_rt_static_runtime(clang_rt.lsan-${arch} ${arch}
+ SOURCES ${LSAN_SOURCES}
+ $<TARGET_OBJECTS:RTInterception.${arch}>
+ $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
+ $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
+ CFLAGS ${LSAN_CFLAGS})
+list(APPEND LSAN_RUNTIME_LIBRARIES clang_rt.lsan-${arch})
+
+add_subdirectory(tests)