[PATCH] D40687: [compiler-rt] Switch to add_llvm_install_targets
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 30 15:22:41 PST 2017
smeenai created this revision.
Herald added subscribers: mgorny, dberris.
This gains us the install-*-stripped targets, to strip binaries during
installation. These targets otherwise mimic the existing install targets.
https://reviews.llvm.org/D40687
Files:
cmake/Modules/AddCompilerRT.cmake
cmake/base-config-ix.cmake
Index: cmake/base-config-ix.cmake
===================================================================
--- cmake/base-config-ix.cmake
+++ cmake/base-config-ix.cmake
@@ -11,6 +11,7 @@
# Top level target used to build all compiler-rt libraries.
add_custom_target(compiler-rt ALL)
add_custom_target(install-compiler-rt)
+add_custom_target(install-compiler-rt-stripped)
set_target_properties(compiler-rt PROPERTIES FOLDER "Compiler-RT Misc")
# Setting these variables from an LLVM build is sufficient that compiler-rt can
Index: cmake/Modules/AddCompilerRT.cmake
===================================================================
--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -205,14 +205,15 @@
# The parent install target specifies the parent component to scrape up
# anything not installed by the individual install targets, and to handle
# installation when running the multi-configuration generators.
- add_custom_target(install-${LIB_PARENT_TARGET}
- DEPENDS ${LIB_PARENT_TARGET}
- COMMAND "${CMAKE_COMMAND}"
- -DCMAKE_INSTALL_COMPONENT=${LIB_PARENT_TARGET}
- -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ add_llvm_install_targets(install-${LIB_PARENT_TARGET}
+ DEPENDS ${LIB_PARENT_TARGET}
+ COMPONENT ${LIB_PARENT_TARGET})
set_target_properties(install-${LIB_PARENT_TARGET} PROPERTIES
FOLDER "Compiler-RT Misc")
+ set_target_properties(install-${LIB_PARENT_TARGET}-stripped PROPERTIES
+ FOLDER "Compiler-RT Misc")
add_dependencies(install-compiler-rt install-${LIB_PARENT_TARGET})
+ add_dependencies(install-compiler-rt-stripped install-${LIB_PARENT_TARGET}-stripped)
endif()
endif()
@@ -262,15 +263,14 @@
# We only want to generate per-library install targets if you aren't using
# an IDE because the extra targets get cluttered in IDEs.
if(NOT CMAKE_CONFIGURATION_TYPES)
- add_custom_target(install-${libname}
- DEPENDS ${libname}
- COMMAND "${CMAKE_COMMAND}"
- -DCMAKE_INSTALL_COMPONENT=${libname}
- -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ add_llvm_install_targets(install-${libname}
+ DEPENDS ${libname}
+ COMPONENT ${libname})
# If you have a parent target specified, we bind the new install target
# to the parent install target.
if(LIB_PARENT_TARGET)
add_dependencies(install-${LIB_PARENT_TARGET} install-${libname})
+ add_dependencies(install-${LIB_PARENT_TARGET}-stripped install-${libname}-stripped)
endif()
endif()
if(APPLE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40687.125041.patch
Type: text/x-patch
Size: 2925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171130/15529c40/attachment-0001.bin>
More information about the cfe-commits
mailing list