diff options
author | Chris Bieneman <beanz@apple.com> | 2015-08-25 19:53:09 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2015-08-25 19:53:09 +0000 |
commit | 0576c367c9981979c19453bc2ff8573d7735ca66 (patch) | |
tree | 4f6c2e43ee4deb133492c6f15b3ba994086c08cf /lib/msan/CMakeLists.txt | |
parent | ce5dd9cb0f58a202b543d80991e1ebd8fed57791 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245970 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/CMakeLists.txt')
-rw-r--r-- | lib/msan/CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/msan/CMakeLists.txt b/lib/msan/CMakeLists.txt index de5980e56..4bb9a3dcc 100644 --- a/lib/msan/CMakeLists.txt +++ b/lib/msan/CMakeLists.txt @@ -27,19 +27,23 @@ set(MSAN_RUNTIME_LIBRARIES) # Static runtime library. add_custom_target(msan) foreach(arch ${MSAN_SUPPORTED_ARCH}) - add_compiler_rt_runtime(clang_rt.msan-${arch} ${arch} STATIC + add_compiler_rt_runtime(clang_rt.msan + STATIC + ARCHS ${arch} SOURCES ${MSAN_RTL_SOURCES} $<TARGET_OBJECTS:RTInterception.${arch}> $<TARGET_OBJECTS:RTSanitizerCommon.${arch}> $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> $<TARGET_OBJECTS:RTUbsan.${arch}> - CFLAGS ${MSAN_RTL_CFLAGS}) - add_compiler_rt_runtime(clang_rt.msan_cxx-${arch} ${arch} STATIC + CFLAGS ${MSAN_RTL_CFLAGS} + PARENT_TARGET msan) + add_compiler_rt_runtime(clang_rt.msan_cxx + STATIC + ARCHS ${arch} SOURCES ${MSAN_RTL_CXX_SOURCES} $<TARGET_OBJECTS:RTUbsan_cxx.${arch}> - CFLAGS ${MSAN_RTL_CFLAGS}) - add_dependencies(msan clang_rt.msan-${arch} - clang_rt.msan_cxx-${arch}) + CFLAGS ${MSAN_RTL_CFLAGS} + PARENT_TARGET msan) list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-${arch} clang_rt.msan_cxx-${arch}) if(UNIX) |