summaryrefslogtreecommitdiffstats
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
commit43937b3758dbe4d9477bb3ab550686be3e542dd0 (patch)
treea6f66d6bb57b49dc9af88b33f8e36cb4f3f4d358
parent76b7bd0e752aefbae72bf658501e6fcde8efddcd (diff)
downloadbcm5719-llvm-43937b3758dbe4d9477bb3ab550686be3e542dd0.tar.gz
bcm5719-llvm-43937b3758dbe4d9477bb3ab550686be3e542dd0.zip
Add cmake rules for building LSan common on Mac OS
llvm-svn: 184639
-rw-r--r--compiler-rt/lib/CMakeLists.txt2
-rw-r--r--compiler-rt/lib/asan/CMakeLists.txt7
-rw-r--r--compiler-rt/lib/asan/lit_tests/TestCases/lsan_annotations.cc (renamed from compiler-rt/lib/asan/lit_tests/TestCases/Linux/lsan_annotations.cc)0
-rw-r--r--compiler-rt/lib/lsan/CMakeLists.txt7
4 files changed, 10 insertions, 6 deletions
diff --git a/compiler-rt/lib/CMakeLists.txt b/compiler-rt/lib/CMakeLists.txt
index e0780ccbba8..a3bc3724f57 100644
--- a/compiler-rt/lib/CMakeLists.txt
+++ b/compiler-rt/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/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt
index 3250dca2a48..064ba1f5803 100644
--- a/compiler-rt/lib/asan/CMakeLists.txt
+++ b/compiler-rt/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/compiler-rt/lib/asan/lit_tests/TestCases/Linux/lsan_annotations.cc b/compiler-rt/lib/asan/lit_tests/TestCases/lsan_annotations.cc
index c55ab8692eb..c55ab8692eb 100644
--- a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/lsan_annotations.cc
+++ b/compiler-rt/lib/asan/lit_tests/TestCases/lsan_annotations.cc
diff --git a/compiler-rt/lib/lsan/CMakeLists.txt b/compiler-rt/lib/lsan/CMakeLists.txt
index 273b18c0b62..d85f1442694 100644
--- a/compiler-rt/lib/lsan/CMakeLists.txt
+++ b/compiler-rt/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}
OpenPOWER on IntegriCloud