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/tsan/dd/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/tsan/dd/CMakeLists.txt')
-rw-r--r-- | lib/tsan/dd/CMakeLists.txt | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/tsan/dd/CMakeLists.txt b/lib/tsan/dd/CMakeLists.txt index 8130e09c2..6330bd9fb 100644 --- a/lib/tsan/dd/CMakeLists.txt +++ b/lib/tsan/dd/CMakeLists.txt @@ -19,25 +19,29 @@ add_custom_target(dd) # Deadlock detector is currently supported on 64-bit Linux only. if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE AND NOT ANDROID) set(arch "x86_64") - add_compiler_rt_runtime(clang_rt.dd-${arch} ${arch} STATIC + add_compiler_rt_runtime(clang_rt.dd + STATIC + ARCHS ${arch} SOURCES ${DD_SOURCES} $<TARGET_OBJECTS:RTInterception.${arch}> $<TARGET_OBJECTS:RTSanitizerCommon.${arch}> $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> - CFLAGS ${DD_CFLAGS}) - add_dependencies(dd clang_rt.dd-${arch}) + CFLAGS ${DD_CFLAGS} + PARENT_TARGET dd) add_compiler_rt_object_libraries(RTDD ARCHS ${arch} SOURCES ${DD_SOURCES} CFLAGS ${DD_CFLAGS}) - add_compiler_rt_runtime(clang_rt.dyndd-${arch} ${arch} SHARED + add_compiler_rt_runtime(clang_rt.dyndd + SHARED + ARCHS ${arch} SOURCES $<TARGET_OBJECTS:RTDD.${arch}> $<TARGET_OBJECTS:RTInterception.${arch}> $<TARGET_OBJECTS:RTSanitizerCommon.${arch}> - $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>) - target_link_libraries(clang_rt.dyndd-${arch} ${DD_LINKLIBS}) - add_dependencies(dd clang_rt.dyndd-${arch}) + $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> + LINK_LIBS ${DD_LINKLIBS} + PARENT_TARGET dd) endif() add_dependencies(compiler-rt dd) |