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
103 lines
3.3 KiB
CMake
103 lines
3.3 KiB
CMake
set(libc_archive_targets "")
|
|
set(libc_archive_names "")
|
|
set(libc_archive_entrypoint_lists "")
|
|
if(LLVM_LIBC_FULL_BUILD)
|
|
list(APPEND libc_archive_names c m mvec)
|
|
list(APPEND libc_archive_targets libc libm libmvec)
|
|
list(APPEND libc_archive_entrypoint_lists
|
|
TARGET_LIBC_ENTRYPOINTS TARGET_LIBM_ENTRYPOINTS TARGET_LIBMVEC_ENTRYPOINTS)
|
|
else()
|
|
list(APPEND libc_archive_names llvmlibc)
|
|
list(APPEND libc_archive_targets libc)
|
|
list(APPEND libc_archive_entrypoint_lists TARGET_LLVMLIBC_ENTRYPOINTS)
|
|
endif()
|
|
|
|
set(added_archive_targets "")
|
|
set(added_bitcode_targets "")
|
|
foreach(archive IN ZIP_LISTS
|
|
libc_archive_names libc_archive_targets libc_archive_entrypoint_lists)
|
|
if(NOT ${archive_2})
|
|
# If an entrypoint list is missing, then skip adding targets for it.
|
|
continue()
|
|
endif()
|
|
add_entrypoint_library(
|
|
${archive_1}
|
|
DEPENDS
|
|
${${archive_2}}
|
|
)
|
|
set_target_properties(
|
|
${archive_1}
|
|
PROPERTIES
|
|
ARCHIVE_OUTPUT_NAME ${archive_0}
|
|
)
|
|
if(LLVM_LIBC_FULL_BUILD)
|
|
target_link_libraries(${archive_1} PUBLIC libc-headers)
|
|
if(TARGET libc-startup)
|
|
add_dependencies(${archive_1} libc-startup)
|
|
endif()
|
|
endif()
|
|
list(APPEND added_archive_targets ${archive_1})
|
|
|
|
# Add the offloading version of the library for offloading languages. These
|
|
# are installed in the standard search path separate from the other libraries.
|
|
if(LIBC_TARGET_OS_IS_GPU)
|
|
add_bitcode_entrypoint_library(
|
|
${archive_1}bitcode
|
|
${archive_1}
|
|
DEPENDS
|
|
${${archive_2}}
|
|
)
|
|
set_target_properties(
|
|
${archive_1}bitcode
|
|
PROPERTIES
|
|
OUTPUT_NAME ${archive_1}.bc
|
|
)
|
|
list(APPEND added_bitcode_targets ${archive_1}bitcode)
|
|
endif()
|
|
endforeach()
|
|
|
|
install(
|
|
TARGETS ${added_archive_targets}
|
|
ARCHIVE DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
|
|
COMPONENT libc
|
|
)
|
|
|
|
foreach(file ${added_bitcode_targets})
|
|
install(FILES $<TARGET_FILE:${file}>
|
|
DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
|
|
RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
|
|
COMPONENT libc
|
|
)
|
|
endforeach()
|
|
|
|
set(startup_target "")
|
|
if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_BAREMETAL)
|
|
# For now we will disable libc-startup installation for baremetal. The
|
|
# correct way to do it would be to make a hookable startup for baremetal
|
|
# and install it as part of the libc installation.
|
|
set(startup_target "libc-startup")
|
|
endif()
|
|
|
|
set(header_install_target "")
|
|
if(LLVM_LIBC_FULL_BUILD)
|
|
set(header_install_target install-libc-headers)
|
|
endif()
|
|
|
|
add_custom_target(install-libc
|
|
DEPENDS ${added_archive_targets}
|
|
${added_bitcode_targets}
|
|
${startup_target}
|
|
${header_install_target}
|
|
COMMAND "${CMAKE_COMMAND}"
|
|
-DCMAKE_INSTALL_COMPONENT=libc
|
|
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
|
add_custom_target(install-libc-stripped
|
|
DEPENDS ${added_archive_targets}
|
|
${added_bitcode_targets}
|
|
${startup_target}
|
|
${header_install_target}
|
|
COMMAND "${CMAKE_COMMAND}"
|
|
-DCMAKE_INSTALL_COMPONENT=libc
|
|
-DCMAKE_INSTALL_DO_STRIP=1
|
|
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
|