summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-18 09:33:45 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-18 09:33:45 +0000
commitcbf39e036dd0af4d9cd4ea29b78d0428edc59b9c (patch)
treef1639a2ff7468773400b9eecfc02464eff10f224 /lib/sanitizer_common/CMakeLists.txt
parent9257648ff0c17bc6c9d40295734b5afb6f6938a7 (diff)
[CMake] Add top-level target for each compiler-rt library, and add 'compiler-rt' target encompassing them all.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/CMakeLists.txt')
-rw-r--r--lib/sanitizer_common/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
index dd45ac511..75f4fcc0a 100644
--- a/lib/sanitizer_common/CMakeLists.txt
+++ b/lib/sanitizer_common/CMakeLists.txt
@@ -94,6 +94,7 @@ append_no_rtti_flag(SANITIZER_CFLAGS)
append_if(SANITIZER_CFLAGS COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG -Wframe-larger-than=512)
append_if(SANITIZER_CFLAGS COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors)
+add_custom_target(sanitizer_common)
set(SANITIZER_RUNTIME_LIBRARIES)
if(APPLE)
# Build universal binary on APPLE.
@@ -122,16 +123,19 @@ else()
add_compiler_rt_object_library(RTSanitizerCommonLibc ${arch}
SOURCES ${SANITIZER_LIBCDEP_SOURCES} CFLAGS ${SANITIZER_CFLAGS}
DEFS ${SANITIZER_COMMON_DEFINITIONS})
+ list(APPEND SANITIZER_RUNTIME_LIBRARIES RTSanitizerCommon.${arch}
+ RTSanitizerCommonLibc.${arch})
add_compiler_rt_static_runtime(clang_rt.san-${arch} ${arch}
SOURCES $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
CFLAGS ${SANITIZER_CFLAGS}
DEFS ${SANITIZER_COMMON_DEFINITIONS})
- list(APPEND SANITIZER_RUNTIME_LIBRARIES RTSanitizerCommon.${arch}
- RTSanitizerCommonLibc.${arch})
+ add_dependencies(sanitizer_common clang_rt.san-${arch})
endforeach()
endif()
+add_dependencies(compiler-rt sanitizer_common)
+
# Unit tests for common sanitizer runtime.
if(LLVM_INCLUDE_TESTS)
add_subdirectory(tests)