summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-08-25 19:53:09 +0000
committerChris Bieneman <beanz@apple.com>2015-08-25 19:53:09 +0000
commitd160260681a1b23a426308791273b9d1d6db0982 (patch)
tree0080b06c856362de5ce61cdbb3048bf478cfaf12 /compiler-rt/lib/builtins
parent47aa53e91c6d42d4554f497df466208766a22301 (diff)
downloadbcm5719-llvm-d160260681a1b23a426308791273b9d1d6db0982.tar.gz
bcm5719-llvm-d160260681a1b23a426308791273b9d1d6db0982.zip
[CMake] merge add_compiler_rt_runtime and add_compiler_rt_darwin_runtime into a single function
Summary: This refactoring moves much of the Apple-specific behavior into a function in AddCompilerRT. The next cleanup patch will remove more of the if(APPLE) checks in the outlying CMakeLists. This patch adds a bunch of new functionality to add_compiler_rt_runtime so that the target names don't need to be reconstructed outside the call. It also updates some of the call sites to exercise the new functionality, but does not update all uses fully. Subsequent patches will further update call sites and move to using the new features. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: beanz, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D12292 llvm-svn: 245970
Diffstat (limited to 'compiler-rt/lib/builtins')
-rw-r--r--compiler-rt/lib/builtins/CMakeLists.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 24a08bb23cc..e7d2f5b2980 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -297,6 +297,10 @@ set(aarch64_SOURCES
add_custom_target(builtins)
+if(APPLE)
+ set(OS_OPTION OS osx)
+endif()
+
if (NOT WIN32 OR MINGW)
foreach (arch x86_64 i386 i686 arm aarch64)
if (CAN_TARGET_${arch})
@@ -311,10 +315,13 @@ if (NOT WIN32 OR MINGW)
endif ()
endforeach ()
- add_compiler_rt_runtime(clang_rt.builtins-${arch} ${arch} STATIC
+ add_compiler_rt_runtime(clang_rt.builtins
+ STATIC
+ ARCH ${arch}
+ ${OS_OPTION}
SOURCES ${${arch}_SOURCES}
- CFLAGS "-std=c99")
- add_dependencies(builtins clang_rt.builtins-${arch})
+ CFLAGS "-std=c99"
+ PARENT_TARGET builtins)
endif ()
endforeach ()
endif ()
OpenPOWER on IntegriCloud