[PATCH] D12409: [CMake] Add PARENT_TARGET option to add_sanitizer_rt_symbols.

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 11:28:42 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL246178: [CMake] Add PARENT_TARGET option to add_sanitizer_rt_symbols. (authored by cbieneman).

Changed prior to commit:
  http://reviews.llvm.org/D12409?vs=33340&id=33342#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12409

Files:
  compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake
  compiler-rt/trunk/lib/ubsan/CMakeLists.txt

Index: compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake
===================================================================
--- compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake
+++ compiler-rt/trunk/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)
Index: compiler-rt/trunk/lib/ubsan/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/lib/ubsan/CMakeLists.txt
+++ compiler-rt/trunk/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()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12409.33342.patch
Type: text/x-patch
Size: 1828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150827/88e5f6dc/attachment.bin>


More information about the llvm-commits mailing list