Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.3
llvm9
llvm-do-not-install-static-libraries.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File llvm-do-not-install-static-libraries.patch of Package llvm9
This has similar effect as simply deleting the static libraries which we don't want after installation. By not copying them in the first place we reduce the disk usage during installation. Index: llvm-9.0.1.src/clang-9.0.1.src/cmake/modules/AddClang.cmake =================================================================== --- llvm-9.0.1.src.orig/clang-9.0.1.src/cmake/modules/AddClang.cmake +++ llvm-9.0.1.src/clang-9.0.1.src/cmake/modules/AddClang.cmake @@ -106,12 +106,15 @@ macro(add_clang_library name) set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True) endif() - install(TARGETS ${name} - COMPONENT ${name} - ${export_to_clangtargets} - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} - RUNTIME DESTINATION bin) + if (ARG_SHARED OR ARG_MODULE) + install(TARGETS ${name} + COMPONENT ${name} + ${export_to_clangtargets} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} + RUNTIME DESTINATION bin) + set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) + endif() if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-${name} @@ -121,7 +124,6 @@ macro(add_clang_library name) set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${name}) endif() - set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) else() # Add empty "phony" target add_custom_target(${name}) Index: llvm-9.0.1.src/cmake/modules/AddLLVM.cmake =================================================================== --- llvm-9.0.1.src.orig/cmake/modules/AddLLVM.cmake +++ llvm-9.0.1.src/cmake/modules/AddLLVM.cmake @@ -695,11 +695,13 @@ macro(add_llvm_library name) set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True) endif() - install(TARGETS ${name} - ${export_to_llvmexports} - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} - RUNTIME DESTINATION bin COMPONENT ${name}) + if(ARG_SHARED OR ARG_MODULE OR NOT LLVM_BUILD_LLVM_DYLIB) + install(TARGETS ${name} + ${export_to_llvmexports} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} + RUNTIME DESTINATION bin COMPONENT ${name}) + endif() if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-${name} Index: llvm-9.0.1.src/lld-9.0.1.src/cmake/modules/AddLLD.cmake =================================================================== --- llvm-9.0.1.src.orig/lld-9.0.1.src/cmake/modules/AddLLD.cmake +++ llvm-9.0.1.src/lld-9.0.1.src/cmake/modules/AddLLD.cmake @@ -17,13 +17,6 @@ macro(add_lld_library name) set_property(GLOBAL PROPERTY LLD_HAS_EXPORTS True) endif() - install(TARGETS ${name} - COMPONENT ${name} - ${export_to_lldtargets} - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} - RUNTIME DESTINATION bin) - if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) add_llvm_install_targets(install-${name} DEPENDS ${name} Index: llvm-9.0.1.src/polly-9.0.1.src/cmake/polly_macros.cmake =================================================================== --- llvm-9.0.1.src.orig/polly-9.0.1.src/cmake/polly_macros.cmake +++ llvm-9.0.1.src/polly-9.0.1.src/cmake/polly_macros.cmake @@ -42,12 +42,14 @@ macro(add_polly_library name) llvm_config(${name} ${LLVM_LINK_COMPONENTS}) endif( LLVM_LINK_COMPONENTS ) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly") - install(TARGETS ${name} - EXPORT LLVMExports - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + if (MODULE OR SHARED_LIBRARY OR NOT LLVM_BUILD_LLVM_DYLIB) + install(TARGETS ${name} + EXPORT LLVMExports + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) + endif() endif() - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) endmacro(add_polly_library) macro(add_polly_loadable_module name) Index: llvm-9.0.1.src/polly-9.0.1.src/lib/CMakeLists.txt =================================================================== --- llvm-9.0.1.src.orig/polly-9.0.1.src/lib/CMakeLists.txt +++ llvm-9.0.1.src/polly-9.0.1.src/lib/CMakeLists.txt @@ -74,7 +74,7 @@ set_target_properties(PollyCore PROPERTI # LLVM_POLLY_LINK_INTO_TOOLS=ON, its dependencies like PollyISL are linked as # well. add_polly_library(Polly $<TARGET_OBJECTS:PollyCore>) -target_link_libraries(Polly PUBLIC +target_link_libraries(Polly PRIVATE ${ISL_TARGET} ) @@ -143,7 +143,7 @@ else () # hosts. This is not the case for bugpoint. Use LLVM_POLLY_LINK_INTO_TOOLS=ON # instead which will automatically resolve the additional dependencies by # Polly. - target_link_libraries(LLVMPolly PUBLIC ${ISL_TARGET}) + target_link_libraries(LLVMPolly PRIVATE ${ISL_TARGET}) if (GPU_CODEGEN) target_link_libraries(LLVMPolly PUBLIC PollyPPCG) endif ()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor