[compiler-rt] r191747 - Add top-level CMake 'compiler-rt' target to build all compiler-rt libraries

Alexey Samsonov samsonov at google.com
Tue Oct 1 05:52:16 PDT 2013


Author: samsonov
Date: Tue Oct  1 07:52:15 2013
New Revision: 191747

URL: http://llvm.org/viewvc/llvm-project?rev=191747&view=rev
Log:
Add top-level CMake 'compiler-rt' target to build all compiler-rt libraries

Modified:
    compiler-rt/trunk/CMakeLists.txt
    compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
    compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=191747&r1=191746&r2=191747&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Tue Oct  1 07:52:15 2013
@@ -15,6 +15,9 @@ include(LLVMParseArguments)
 # runtime libraries.
 cmake_minimum_required(VERSION 2.8.8)
 
+# Top level target used to build all compiler-rt libraries.
+add_custom_target(compiler-rt)
+
 # Compute the Clang version from the LLVM version.
 # FIXME: We should be able to reuse CLANG_VERSION variable calculated
 #        in Clang cmake files, instead of copying the rules here.

Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=191747&r1=191746&r2=191747&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Tue Oct  1 07:52:15 2013
@@ -58,6 +58,7 @@ macro(add_compiler_rt_static_runtime nam
     # Add installation command.
     install(TARGETS ${name}
       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR})
+    add_dependencies(compiler-rt ${name})
   else()
     message(FATAL_ERROR "Archtecture ${arch} can't be targeted")
   endif()
@@ -80,6 +81,7 @@ macro(add_compiler_rt_osx_static_runtime
     ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
   install(TARGETS ${name}
     ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR})
+  add_dependencies(compiler-rt ${name})
 endmacro()
 
 # Adds dynamic runtime library on osx, which supports multiple architectures.
@@ -100,6 +102,7 @@ macro(add_compiler_rt_osx_dynamic_runtim
     LIBRARY_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
   install(TARGETS ${name}
     LIBRARY DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR})
+  add_dependencies(compiler-rt ${name})
 endmacro()
 
 # Unittests support.

Modified: compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake?rev=191747&r1=191746&r2=191747&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake Tue Oct  1 07:52:15 2013
@@ -26,6 +26,7 @@ macro(add_sanitizer_rt_symbols name)
     DEPENDS ${symsfile}
     SOURCES ${SANITIZER_GEN_DYNAMIC_LIST} ${ARGN})
   install(FILES ${symsfile} DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR})
+  add_dependencies(compiler-rt ${name}-symbols)
 endmacro()
 
 # Add target to check code style for sanitizer runtimes.





More information about the llvm-commits mailing list