summaryrefslogtreecommitdiff
path: root/lib/safestack
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-08-18 17:32:18 +0000
committerChris Bieneman <beanz@apple.com>2015-08-18 17:32:18 +0000
commit607a4f74727d6e4140e3a957aaaaf9d0666ce667 (patch)
treefdf7ee5646c00852a27385b7f50cc5ddf0763f11 /lib/safestack
parent5708a2383ea388510464a12c9c708b224d492e74 (diff)
[CMake] Refactoring add_compiler_rt functions for darwin runtimes.
Summary: This patch consolidates add_compiler_rt_osx_static_runtime and add_compiler_rt_darwin_dynamic_runtime into a single new function add_compiler_rt_darwin_runtime. Reviewers: filcab, samsonov, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12106 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/safestack')
-rw-r--r--lib/safestack/CMakeLists.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/safestack/CMakeLists.txt b/lib/safestack/CMakeLists.txt
index 6a8ad2f50..d6969f98b 100644
--- a/lib/safestack/CMakeLists.txt
+++ b/lib/safestack/CMakeLists.txt
@@ -8,13 +8,16 @@ set(SAFESTACK_CFLAGS ${SANITIZER_COMMON_CFLAGS})
if(APPLE)
# Build universal binary on APPLE.
- add_compiler_rt_osx_static_runtime(clang_rt.safestack_osx
- ARCH ${SAFESTACK_SUPPORTED_ARCH}
- SOURCES ${SAFESTACK_SOURCES}
- $<TARGET_OBJECTS:RTInterception.osx>
- $<TARGET_OBJECTS:RTSanitizerCommon.osx>
- CFLAGS ${SAFESTACK_CFLAGS})
- add_dependencies(safestack clang_rt.safestack_osx)
+ foreach (os ${SANITIZER_COMMON_SUPPORTED_OS})
+ add_compiler_rt_darwin_runtime(clang_rt.safestack_${os} ${os}
+ STATIC
+ ARCH ${SAFESTACK_SUPPORTED_ARCH}
+ SOURCES ${SAFESTACK_SOURCES}
+ $<TARGET_OBJECTS:RTInterception.${os}>
+ $<TARGET_OBJECTS:RTSanitizerCommon.${os}>
+ CFLAGS ${SAFESTACK_CFLAGS})
+ add_dependencies(safestack clang_rt.safestack_${os})
+ endforeach()
else()
# Otherwise, build separate libraries for each target.
foreach(arch ${SAFESTACK_SUPPORTED_ARCH})