[PATCH] D12409: [CMake] Add PARENT_TARGET option to add_sanitizer_rt_symbols.
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 11:07:23 PDT 2015
beanz created this revision.
beanz added reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov.
beanz added a subscriber: llvm-commits.
This is another step in a multi-step refactoring to move add_sanitizer_rt_symbols in the direction of other add_* functions in compiler-rt.
http://reviews.llvm.org/D12409
Files:
cmake/Modules/SanitizerUtils.cmake
lib/ubsan/CMakeLists.txt
Index: lib/ubsan/CMakeLists.txt
===================================================================
--- lib/ubsan/CMakeLists.txt
+++ lib/ubsan/CMakeLists.txt
@@ -97,12 +97,11 @@
foreach(arch ${UBSAN_SUPPORTED_ARCH})
if (UNIX AND NOT ${arch} MATCHES "i386|i686")
add_sanitizer_rt_symbols(clang_rt.ubsan_standalone-${arch}
+ PARENT_TARGET ubsan
EXTRA ubsan.syms.extra)
add_sanitizer_rt_symbols(clang_rt.ubsan_standalone_cxx-${arch}
+ PARENT_TARGET ubsan
EXTRA ubsan.syms.extra)
- add_dependencies(ubsan
- clang_rt.ubsan_standalone-${arch}-symbols
- clang_rt.ubsan_standalone_cxx-${arch}-symbols)
endif()
endforeach()
endif()
Index: cmake/Modules/SanitizerUtils.cmake
===================================================================
--- cmake/Modules/SanitizerUtils.cmake
+++ cmake/Modules/SanitizerUtils.cmake
@@ -9,11 +9,12 @@
# interceptors are exported automatically, user can also provide files with
# symbol names that should be exported as well.
# add_sanitizer_rt_symbols(<name>
+# PARENT_TARGET <convenience parent target>
# EXTRA <files with extra symbols to export>)
macro(add_sanitizer_rt_symbols name)
cmake_parse_arguments(ARG
""
- ""
+ "PARENT_TARGET"
"EXTRA"
${ARGN})
set(stamp ${CMAKE_CURRENT_BINARY_DIR}/${name}.syms-stamp)
@@ -50,6 +51,9 @@
install(FILES ${libfile}.syms DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR})
endif()
endif()
+ if(ARG_PARENT_TARGET)
+ add_dependencies(${ARG_PARENT_TARGET} ${name}-symbols)
+ endif()
endmacro()
macro(add_sanitizer_rt_version_list name)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12409.33340.patch
Type: text/x-patch
Size: 1720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150827/3df04a2a/attachment.bin>
More information about the llvm-commits
mailing list