diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bf7cfc72..889efd09e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,6 +212,13 @@ install( PATTERN "*.template" PATTERN ".git" EXCLUDE PATTERN ".svn" EXCLUDE) +if (NOT LLVM_ENABLE_IDE) + # LLVM_DISTRIBUTION_COMPONENTS requires that each component have both a + # component and an install-component target, so add appropriate dummy targets. + add_custom_target(linker-script) + add_llvm_install_targets(install-linker-script + COMPONENT linker-script) +endif() set(ELD_INSTALL_YAML_MAP_PARSER ON @@ -224,5 +231,13 @@ if(ELD_INSTALL_YAML_MAP_PARSER) set(ELD_YAML_MAP_PARSER_DEST_DIR "bin") endif() install(PROGRAMS utils/YAMLMapParser/YAMLMapParser.py - DESTINATION ${ELD_YAML_MAP_PARSER_DEST_DIR}) + DESTINATION ${ELD_YAML_MAP_PARSER_DEST_DIR} + COMPONENT YAMLMapParser) + if (NOT LLVM_ENABLE_IDE) + # LLVM_DISTRIBUTION_COMPONENTS requires that each component have both a + # component and an install-component target, so add appropriate dummy targets. + add_custom_target(YAMLMapParser) + add_llvm_install_targets(install-YAMLMapParser + COMPONENT YAMLMapParser) + endif() endif() diff --git a/include/eld/CMakeLists.txt b/include/eld/CMakeLists.txt index f3c69b446..320889ac8 100644 --- a/include/eld/CMakeLists.txt +++ b/include/eld/CMakeLists.txt @@ -21,4 +21,12 @@ if(ENABLE_ELD_PLUGIN_SUPPORT) DESTINATION include/ELD/PluginAPI/ COMPONENT PluginAPIHeaders) endif() + + if (NOT LLVM_ENABLE_IDE) + # LLVM_DISTRIBUTION_COMPONENTS requires that each component have both a + # component and an install-component target, so add appropriate dummy targets. + add_custom_target(PluginAPIHeaders) + add_llvm_install_targets(install-PluginAPIHeaders + COMPONENT PluginAPIHeaders) + endif() endif() diff --git a/tools/eld/CMakeLists.txt b/tools/eld/CMakeLists.txt index 208918afb..daad2826f 100644 --- a/tools/eld/CMakeLists.txt +++ b/tools/eld/CMakeLists.txt @@ -28,7 +28,15 @@ configure_file(eld_install.cmake.in # from top level llvm build directory configure_file(eld_install.cmake.in ${CMAKE_BINARY_DIR}/eld_install.cmake) -install(TARGETS ld.eld RUNTIME DESTINATION bin) +install(TARGETS ld.eld RUNTIME DESTINATION bin COMPONENT ld.eld) +if (NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-ld.eld + DEPENDS ld.eld + COMPONENT ld.eld) + add_dependencies(install-ld.eld install-${LINKER_WRAPPER_LIB}) + add_dependencies(install-ld.eld-stripped + install-${LINKER_WRAPPER_LIB}-stripped) +endif() # FIXME: We need to switch to ELD_TARGETS_TO_BUILD after the buildbot upgrade if("${LLVM_TARGETS_TO_BUILD}" MATCHES "Hexagon" AND "${TARGET_TRIPLE}" MATCHES @@ -79,4 +87,5 @@ if(DEFINED USE_LINKER_ALT_NAME) endif() # Create the symlink at installation time. -install(SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/ld_eld_symlink.cmake) +install(SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/ld_eld_symlink.cmake + COMPONENT ld.eld)