summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-06-22 16:33:52 +0000
committerAlexey Samsonov <samsonov@google.com>2013-06-22 16:33:52 +0000
commitc3b30b378741f3ec0f4d615ef172b68e1cf97e39 (patch)
tree02ae82449561b0e4b9cdb2bf65471e8b4aaef351
parent21e024eb4f1aa3c42bb9dbd1d93a4299807f9555 (diff)
downloadcompiler-rt-c3b30b378741f3ec0f4d615ef172b68e1cf97e39.tar.gz
compiler-rt-c3b30b378741f3ec0f4d615ef172b68e1cf97e39.tar.bz2
compiler-rt-c3b30b378741f3ec0f4d615ef172b68e1cf97e39.tar.xz
Add cmake rules for building LSan common on Mac OS
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184639 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CMakeLists.txt2
-rw-r--r--lib/asan/CMakeLists.txt7
-rw-r--r--lib/asan/lit_tests/TestCases/lsan_annotations.cc (renamed from lib/asan/lit_tests/TestCases/Linux/lsan_annotations.cc)0
-rw-r--r--lib/lsan/CMakeLists.txt7
4 files changed, 10 insertions, 6 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index e0780ccb..a3bc3724 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -7,6 +7,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux")
add_subdirectory(interception)
add_subdirectory(sanitizer_common)
if(NOT ANDROID)
+ add_subdirectory(lsan)
add_subdirectory(profile)
add_subdirectory(ubsan)
endif()
@@ -16,7 +17,6 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID)
add_subdirectory(tsan)
add_subdirectory(msan)
add_subdirectory(msandr)
- add_subdirectory(lsan)
endif()
# The top-level lib directory contains a large amount of C code which provides
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
index 3250dca2..064ba1f5 100644
--- a/lib/asan/CMakeLists.txt
+++ b/lib/asan/CMakeLists.txt
@@ -19,12 +19,10 @@ set(ASAN_SOURCES
asan_stack.cc
asan_stats.cc
asan_thread.cc
- asan_win.cc
- )
+ asan_win.cc)
set(ASAN_DYLIB_SOURCES
- ${ASAN_SOURCES}
- )
+ ${ASAN_SOURCES})
include_directories(..)
@@ -58,6 +56,7 @@ if(APPLE)
SOURCES ${ASAN_DYLIB_SOURCES}
$<TARGET_OBJECTS:RTInterception.osx>
$<TARGET_OBJECTS:RTSanitizerCommon.osx>
+ $<TARGET_OBJECTS:RTLSanCommon.osx>
CFLAGS ${ASAN_CFLAGS}
DEFS ${ASAN_COMMON_DEFINITIONS}
# Dynamic lookup is needed because shadow scale and offset are
diff --git a/lib/asan/lit_tests/TestCases/Linux/lsan_annotations.cc b/lib/asan/lit_tests/TestCases/lsan_annotations.cc
index c55ab869..c55ab869 100644
--- a/lib/asan/lit_tests/TestCases/Linux/lsan_annotations.cc
+++ b/lib/asan/lit_tests/TestCases/lsan_annotations.cc
diff --git a/lib/lsan/CMakeLists.txt b/lib/lsan/CMakeLists.txt
index 273b18c0..d85f1442 100644
--- a/lib/lsan/CMakeLists.txt
+++ b/lib/lsan/CMakeLists.txt
@@ -26,7 +26,12 @@ filter_available_targets(LSAN_SUPPORTED_ARCH
set(LSAN_RUNTIME_LIBRARIES)
-if (NOT APPLE AND NOT ANDROID)
+if(APPLE)
+ add_compiler_rt_osx_object_library(RTLSanCommon
+ ARCH ${LSAN_COMMON_SUPPORTED_ARCH}
+ SOURCES ${LSAN_COMMON_SOURCES}
+ CFLAGS ${LSAN_CFLAGS})
+elseif(NOT ANDROID)
foreach(arch ${LSAN_COMMON_SUPPORTED_ARCH})
add_compiler_rt_object_library(RTLSanCommon ${arch}
SOURCES ${LSAN_COMMON_SOURCES}