summaryrefslogtreecommitdiff
path: root/cmake/Modules/CompilerRTUtils.cmake
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-08-13 20:38:16 +0000
committerChris Bieneman <beanz@apple.com>2015-08-13 20:38:16 +0000
commit19c8451a0e798abcfd1762fa8196f22b43018d2e (patch)
tree97af6f6cd847104c6cbe85e2c3e52c3bb5b0794c /cmake/Modules/CompilerRTUtils.cmake
parent1b93c183b00c0b29fd6e14c1ea9b8342c6417f7b (diff)
[CMake] Add experimental support for building compiler-rt for iOS
Summary: This is a reunification of three separate reviews D11073, D11082, D11083. Having them separate was not constructive even though the patches were smaller because it led to fragmented conversations, and this is really all about one change. This patch incorporates feedback from samsonov, and refactors the hacky darwin code out of the root CMakeLists.txt and int config-ix.cmake. Reviewers: zaks.anna, bogner, kubabrecka, chandlerc, samsonov Subscribers: jevinskie, filcab, llvm-commits Differential Revision: http://reviews.llvm.org/D11820 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r--cmake/Modules/CompilerRTUtils.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
index f7f60a4ac..cf690f4a3 100644
--- a/cmake/Modules/CompilerRTUtils.cmake
+++ b/cmake/Modules/CompilerRTUtils.cmake
@@ -57,3 +57,13 @@ macro(append_have_file_definition filename varname list)
endif()
list(APPEND ${list} "${varname}=${${varname}}")
endmacro()
+
+macro(list_union output input1 input2)
+ set(${output})
+ foreach(it ${${input1}})
+ list(FIND ${input2} ${it} index)
+ if( NOT (index EQUAL -1))
+ list(APPEND ${output} ${it})
+ endif()
+ endforeach()
+endmacro()