CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
88 lines
2.7 KiB
CMake
88 lines
2.7 KiB
CMake
include(GNUInstallDirs)
|
|
include(LLVMDistributionSupport)
|
|
|
|
macro(add_lld_library name)
|
|
cmake_parse_arguments(ARG
|
|
"SHARED"
|
|
""
|
|
""
|
|
${ARGN})
|
|
if(ARG_SHARED)
|
|
set(ARG_ENABLE_SHARED SHARED)
|
|
endif()
|
|
llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS})
|
|
|
|
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
get_target_export_arg(${name} LLD export_to_lldtargets UMBRELLA lld-libraries)
|
|
install(TARGETS ${name}
|
|
COMPONENT ${name}
|
|
${export_to_lldtargets}
|
|
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
|
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
|
|
|
if (NOT CMAKE_CONFIGURATION_TYPES)
|
|
add_llvm_install_targets(install-${name}
|
|
DEPENDS ${name}
|
|
COMPONENT ${name})
|
|
endif()
|
|
set_property(GLOBAL APPEND PROPERTY LLD_ALL_LIBS ${name})
|
|
set_property(GLOBAL APPEND PROPERTY LLD_EXPORTS ${name})
|
|
endif()
|
|
endmacro(add_lld_library)
|
|
|
|
macro(add_lld_executable name)
|
|
add_llvm_executable(${name} ${ARGN})
|
|
endmacro(add_lld_executable)
|
|
|
|
macro(add_lld_tool name)
|
|
cmake_parse_arguments(ARG "DEPENDS;GENERATE_DRIVER" "" "" ${ARGN})
|
|
if (NOT LLD_BUILD_TOOLS)
|
|
set(EXCLUDE_FROM_ALL ON)
|
|
endif()
|
|
if(ARG_GENERATE_DRIVER
|
|
AND LLVM_TOOL_LLVM_DRIVER_BUILD
|
|
AND (NOT LLVM_DISTRIBUTION_COMPONENTS OR ${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS)
|
|
)
|
|
set(get_obj_args ${ARGN})
|
|
list(FILTER get_obj_args EXCLUDE REGEX "^SUPPORT_PLUGINS$")
|
|
generate_llvm_objects(${name} ${get_obj_args})
|
|
add_custom_target(${name} DEPENDS llvm-driver)
|
|
else()
|
|
add_lld_executable(${name} ${ARGN})
|
|
|
|
if (LLD_BUILD_TOOLS)
|
|
get_target_export_arg(${name} LLD export_to_lldtargets)
|
|
install(TARGETS ${name}
|
|
${export_to_lldtargets}
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
COMPONENT ${name})
|
|
|
|
if (LLVM_ENABLE_PDB)
|
|
install(FILES $<TARGET_PDB_FILE:${name}> DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name} OPTIONAL)
|
|
endif()
|
|
|
|
if(NOT CMAKE_CONFIGURATION_TYPES)
|
|
add_llvm_install_targets(install-${name}
|
|
DEPENDS ${name}
|
|
COMPONENT ${name})
|
|
endif()
|
|
set_property(GLOBAL APPEND PROPERTY LLD_EXPORTS ${name})
|
|
endif()
|
|
endif()
|
|
endmacro()
|
|
|
|
macro(add_lld_symlink name dest)
|
|
get_property(LLVM_DRIVER_TOOLS GLOBAL PROPERTY LLVM_DRIVER_TOOLS)
|
|
if(LLVM_TOOL_LLVM_DRIVER_BUILD
|
|
AND ${dest} IN_LIST LLVM_DRIVER_TOOLS
|
|
AND (NOT LLVM_DISTRIBUTION_COMPONENTS OR ${dest} IN_LIST LLVM_DISTRIBUTION_COMPONENTS)
|
|
)
|
|
set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_TOOL_ALIASES_${dest} ${name})
|
|
else()
|
|
llvm_add_tool_symlink(LLD ${name} ${dest} ALWAYS_GENERATE)
|
|
# Always generate install targets
|
|
llvm_install_symlink(LLD ${name} ${dest} ALWAYS_GENERATE)
|
|
endif()
|
|
endmacro()
|