summaryrefslogtreecommitdiffstats
path: root/compiler-rt/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
commit201d065259658b822b2470fc924b6036715ab4f3 (patch)
tree32885abddf7ba632282f18b84f185f669c89839b /compiler-rt/lib/safestack
parentacb6ade757f6cca1a56df11052e07a16a114296f (diff)
downloadbcm5719-llvm-201d065259658b822b2470fc924b6036715ab4f3.tar.gz
bcm5719-llvm-201d065259658b822b2470fc924b6036715ab4f3.zip
[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 llvm-svn: 245317
Diffstat (limited to 'compiler-rt/lib/safestack')
-rw-r--r--compiler-rt/lib/safestack/CMakeLists.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/compiler-rt/lib/safestack/CMakeLists.txt b/compiler-rt/lib/safestack/CMakeLists.txt
index 6a8ad2f50ed..d6969f98b7c 100644
--- a/compiler-rt/lib/safestack/CMakeLists.txt
+++ b/compiler-rt/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})
OpenPOWER on IntegriCloud