[libc-commits] [libc] [llvm] [libc] Use llvm-link approach to create libc bitcode library for GPU targets (PR #210662)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 31 05:09:16 PDT 2026
https://github.com/jinge90 updated https://github.com/llvm/llvm-project/pull/210662
>From 3ed4bdd51da023ad16f9babfd8342d7b27a91819 Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Mon, 20 Jul 2026 15:54:29 +0800
Subject: [PATCH 1/8] [libc] Fix libc GPU bitcode entrypoint library build on
Windows
Signed-off-by: jinge90 <ge.jin at intel.com>
---
libc/CMakeLists.txt | 7 +++
libc/cmake/modules/LLVMLibCLibraryRules.cmake | 60 +++++++++++++++++--
libc/lib/CMakeLists.txt | 18 ++++--
libc/startup/gpu/CMakeLists.txt | 24 +++++---
4 files changed, 91 insertions(+), 18 deletions(-)
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index af820ba6ab6c0..3643ef7213a81 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -289,6 +289,13 @@ endif()
if(LIBC_TARGET_OS_IS_GPU)
include(prepare_libc_gpu_build)
set(LIBC_ENABLE_UNITTESTS OFF)
+
+ if(CMAKE_HOST_WIN32)
+ find_program(LIBC_LLVM_LINK llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ if(NOT LIBC_LLVM_LINK)
+ message(FATAL_ERROR "llvm-link not found in ${LLVM_TOOLS_BINARY_DIR}")
+ endif()
+ endif()
elseif(LIBC_TARGET_OS_IS_BAREMETAL)
set(LIBC_ENABLE_UNITTESTS OFF)
endif()
diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index 2df8f49100b99..4e6532a4402cb 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -80,13 +80,43 @@ function(get_all_object_file_deps result fq_deps_list)
set(${result} ${all_deps} PARENT_SCOPE)
endfunction()
-# A rule to build a library from a collection of entrypoint objects and bundle
-# it in a single LLVM-IR bitcode file.
+# Link bitcode inputs into a single LLVM IR module using llvm-link. Used on
+# Windows where 'add_executable' can't work. Build static archive library
+# firstly and use this static archive library as llvm-link's input.
# Usage:
-# add_bitcode_entrypoint_library(
+# llvm_link_bitcode(
+# target_name
+# OUTPUT <output file path>
+# INPUTS <input file path>
+# DEPENDS <targets that must be built first>
+# )
+function(llvm_link_bitcode target_name)
+ cmake_parse_arguments(
+ "ARG"
+ ""
+ "OUTPUT"
+ "INPUTS;DEPENDS"
+ ${ARGN}
+ )
+ add_custom_command(
+ OUTPUT ${ARG_OUTPUT}
+ COMMAND ${LIBC_LLVM_LINK} ${ARG_INPUTS} -o ${ARG_OUTPUT}
+ DEPENDS ${ARG_DEPENDS}
+ COMMENT "Linking bitcode ${ARG_OUTPUT}"
+ )
+ add_custom_target(${target_name} ALL DEPENDS ${ARG_OUTPUT})
+ set_target_properties(${target_name} PROPERTIES TARGET_FILE ${ARG_OUTPUT})
+endfunction(llvm_link_bitcode)
+
+# Build a single LLVM IR module by using clang driver to link object files
+# files with LTO. Used on Linux platform.
+# Usage:
+# add_bitcode_entrypoint_library_lto(
+# target_name
+# base_target_name
# DEPENDS <list of add_entrypoint_object targets>
# )
-function(add_bitcode_entrypoint_library target_name base_target_name)
+function(add_bitcode_entrypoint_library_lto target_name base_target_name)
cmake_parse_arguments(
"ENTRYPOINT_LIBRARY"
"" # No optional arguments
@@ -112,11 +142,31 @@ function(add_bitcode_entrypoint_library target_name base_target_name)
if(LIBC_TARGET_ARCHITECTURE_IS_SPIRV)
target_link_options(${target_name} PRIVATE "${LIBC_COMPILE_OPTIONS_DEFAULT}"
"-nostdlib" "-emit-llvm")
- else()
+ else()
target_link_options(${target_name} PRIVATE "${LIBC_COMPILE_OPTIONS_DEFAULT}"
"-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
endif()
add_dependencies(${base_target_name} ${target_name})
+endfunction(add_bitcode_entrypoint_library_lto)
+
+# A rule to build a library from a collection of entrypoint objects and bundle
+# it in a single LLVM IR module.
+# Usage:
+# add_bitcode_entrypoint_library(
+# target_name
+# base_target_name
+# DEPENDS <list of add_entrypoint_object targets>
+# )
+function(add_bitcode_entrypoint_library target_name base_target_name)
+ if(CMAKE_HOST_WIN32)
+ llvm_link_bitcode(${target_name}
+ OUTPUT ${LIBC_LIBRARY_DIR}/${target_name}.bc
+ INPUTS $<TARGET_FILE:${base_target_name}>
+ DEPENDS ${base_target_name}
+ )
+ else()
+ add_bitcode_entrypoint_library_lto(${target_name} ${base_target_name} ${ARGN})
+ endif()
endfunction(add_bitcode_entrypoint_library)
# A rule to build a library from a collection of entrypoint objects.
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index 8ef0329471521..0029dcabd3ac8 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -63,11 +63,19 @@ install(
)
foreach(file ${added_bitcode_targets})
- install(FILES $<TARGET_FILE:${file}>
- DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
- RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
- COMPONENT libc
- )
+ if(CMAKE_HOST_WIN32)
+ install(FILES $<TARGET_PROPERTY:${file},TARGET_FILE>
+ DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
+ RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
+ COMPONENT libc
+ )
+ else()
+ install(FILES $<TARGET_FILE:${file}>
+ DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
+ RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
+ COMPONENT libc
+ )
+ endif()
endforeach()
# Add empty archive libraries for compatibility with systems expecting certain
diff --git a/libc/startup/gpu/CMakeLists.txt b/libc/startup/gpu/CMakeLists.txt
index 12cb891a687d8..cf7ea76a2ba8e 100644
--- a/libc/startup/gpu/CMakeLists.txt
+++ b/libc/startup/gpu/CMakeLists.txt
@@ -27,15 +27,23 @@ function(add_startup_object name)
OUTPUT_NAME ${name}.o
)
- # Make an executable target of relocatable bitcode for clang if needed.
+ # Make a relocatable bitcode object for clang if needed.
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
- add_executable(${fq_target_name}.exe $<TARGET_OBJECTS:${fq_target_name}>)
- set_target_properties(${fq_target_name}.exe PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${LIBC_LIBRARY_DIR}
- RUNTIME_OUTPUT_NAME ${name}.o)
- target_link_options(${fq_target_name}.exe PRIVATE
- ${LIBC_COMPILE_OPTIONS_DEFAULT}
- "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
+ if(CMAKE_HOST_WIN32)
+ llvm_link_bitcode(${fq_target_name}.exe
+ OUTPUT ${LIBC_LIBRARY_DIR}/${name}.o
+ INPUTS $<TARGET_OBJECTS:${fq_target_name}>
+ DEPENDS ${fq_target_name}
+ )
+ else()
+ add_executable(${fq_target_name}.exe $<TARGET_OBJECTS:${fq_target_name}>)
+ set_target_properties(${fq_target_name}.exe PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY ${LIBC_LIBRARY_DIR}
+ RUNTIME_OUTPUT_NAME ${name}.o)
+ target_link_options(${fq_target_name}.exe PRIVATE
+ ${LIBC_COMPILE_OPTIONS_DEFAULT}
+ "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
+ endif()
endif()
endfunction()
>From 9a48d714780fc6cc5085b24b1bc858ca85983ed1 Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Tue, 21 Jul 2026 10:43:57 +0800
Subject: [PATCH 2/8] remove WIN32 split
Signed-off-by: jinge90 <ge.jin at intel.com>
---
libc/CMakeLists.txt | 9 +--
libc/cmake/modules/LLVMLibCLibraryRules.cmake | 61 +++----------------
libc/lib/CMakeLists.txt | 18 ++----
libc/startup/gpu/CMakeLists.txt | 20 ++----
4 files changed, 21 insertions(+), 87 deletions(-)
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 3643ef7213a81..c88455aa3c11d 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -289,12 +289,9 @@ endif()
if(LIBC_TARGET_OS_IS_GPU)
include(prepare_libc_gpu_build)
set(LIBC_ENABLE_UNITTESTS OFF)
-
- if(CMAKE_HOST_WIN32)
- find_program(LIBC_LLVM_LINK llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
- if(NOT LIBC_LLVM_LINK)
- message(FATAL_ERROR "llvm-link not found in ${LLVM_TOOLS_BINARY_DIR}")
- endif()
+ find_program(LIBC_LLVM_LINK llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ if(NOT LIBC_LLVM_LINK)
+ message(FATAL_ERROR "llvm-link not found in ${LLVM_TOOLS_BINARY_DIR}")
endif()
elseif(LIBC_TARGET_OS_IS_BAREMETAL)
set(LIBC_ENABLE_UNITTESTS OFF)
diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index 4e6532a4402cb..a90877dfb2746 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -80,9 +80,9 @@ function(get_all_object_file_deps result fq_deps_list)
set(${result} ${all_deps} PARENT_SCOPE)
endfunction()
-# Link bitcode inputs into a single LLVM IR module using llvm-link. Used on
-# Windows where 'add_executable' can't work. Build static archive library
-# firstly and use this static archive library as llvm-link's input.
+# Link bitcode inputs into a single LLVM IR module using llvm-link. Build
+# static archive library firstly and use this static archive library as
+# as llvm-link's input.
# Usage:
# llvm_link_bitcode(
# target_name
@@ -108,47 +108,6 @@ function(llvm_link_bitcode target_name)
set_target_properties(${target_name} PROPERTIES TARGET_FILE ${ARG_OUTPUT})
endfunction(llvm_link_bitcode)
-# Build a single LLVM IR module by using clang driver to link object files
-# files with LTO. Used on Linux platform.
-# Usage:
-# add_bitcode_entrypoint_library_lto(
-# target_name
-# base_target_name
-# DEPENDS <list of add_entrypoint_object targets>
-# )
-function(add_bitcode_entrypoint_library_lto target_name base_target_name)
- cmake_parse_arguments(
- "ENTRYPOINT_LIBRARY"
- "" # No optional arguments
- "" # No single value arguments
- "DEPENDS" # Multi-value arguments
- ${ARGN}
- )
- if(NOT ENTRYPOINT_LIBRARY_DEPENDS)
- message(FATAL_ERROR "'add_entrypoint_library' target requires a DEPENDS list "
- "of 'add_entrypoint_object' targets.")
- endif()
-
- get_fq_deps_list(fq_deps_list ${ENTRYPOINT_LIBRARY_DEPENDS})
- get_all_object_file_deps(all_deps "${fq_deps_list}")
-
- set(objects "")
- foreach(dep IN LISTS all_deps)
- set(object $<$<STREQUAL:$<TARGET_NAME_IF_EXISTS:${dep}>,${dep}>:$<TARGET_OBJECTS:${dep}>>)
- list(APPEND objects ${object})
- endforeach()
-
- add_executable(${target_name} ${objects})
- if(LIBC_TARGET_ARCHITECTURE_IS_SPIRV)
- target_link_options(${target_name} PRIVATE "${LIBC_COMPILE_OPTIONS_DEFAULT}"
- "-nostdlib" "-emit-llvm")
- else()
- target_link_options(${target_name} PRIVATE "${LIBC_COMPILE_OPTIONS_DEFAULT}"
- "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
- endif()
- add_dependencies(${base_target_name} ${target_name})
-endfunction(add_bitcode_entrypoint_library_lto)
-
# A rule to build a library from a collection of entrypoint objects and bundle
# it in a single LLVM IR module.
# Usage:
@@ -158,15 +117,11 @@ endfunction(add_bitcode_entrypoint_library_lto)
# DEPENDS <list of add_entrypoint_object targets>
# )
function(add_bitcode_entrypoint_library target_name base_target_name)
- if(CMAKE_HOST_WIN32)
- llvm_link_bitcode(${target_name}
- OUTPUT ${LIBC_LIBRARY_DIR}/${target_name}.bc
- INPUTS $<TARGET_FILE:${base_target_name}>
- DEPENDS ${base_target_name}
- )
- else()
- add_bitcode_entrypoint_library_lto(${target_name} ${base_target_name} ${ARGN})
- endif()
+ llvm_link_bitcode(${target_name}
+ OUTPUT ${LIBC_LIBRARY_DIR}/${target_name}.bc
+ INPUTS $<TARGET_FILE:${base_target_name}>
+ DEPENDS ${base_target_name}
+ )
endfunction(add_bitcode_entrypoint_library)
# A rule to build a library from a collection of entrypoint objects.
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index 0029dcabd3ac8..a12c020a2aae8 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -63,19 +63,11 @@ install(
)
foreach(file ${added_bitcode_targets})
- if(CMAKE_HOST_WIN32)
- install(FILES $<TARGET_PROPERTY:${file},TARGET_FILE>
- DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
- RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
- COMPONENT libc
- )
- else()
- install(FILES $<TARGET_FILE:${file}>
- DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
- RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
- COMPONENT libc
- )
- endif()
+ install(FILES $<TARGET_PROPERTY:${file},TARGET_FILE>
+ DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
+ RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
+ COMPONENT libc
+ )
endforeach()
# Add empty archive libraries for compatibility with systems expecting certain
diff --git a/libc/startup/gpu/CMakeLists.txt b/libc/startup/gpu/CMakeLists.txt
index cf7ea76a2ba8e..7744bbbb595c1 100644
--- a/libc/startup/gpu/CMakeLists.txt
+++ b/libc/startup/gpu/CMakeLists.txt
@@ -29,21 +29,11 @@ function(add_startup_object name)
# Make a relocatable bitcode object for clang if needed.
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
- if(CMAKE_HOST_WIN32)
- llvm_link_bitcode(${fq_target_name}.exe
- OUTPUT ${LIBC_LIBRARY_DIR}/${name}.o
- INPUTS $<TARGET_OBJECTS:${fq_target_name}>
- DEPENDS ${fq_target_name}
- )
- else()
- add_executable(${fq_target_name}.exe $<TARGET_OBJECTS:${fq_target_name}>)
- set_target_properties(${fq_target_name}.exe PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${LIBC_LIBRARY_DIR}
- RUNTIME_OUTPUT_NAME ${name}.o)
- target_link_options(${fq_target_name}.exe PRIVATE
- ${LIBC_COMPILE_OPTIONS_DEFAULT}
- "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
- endif()
+ llvm_link_bitcode(${fq_target_name}.exe
+ OUTPUT ${LIBC_LIBRARY_DIR}/${name}.o
+ INPUTS $<TARGET_OBJECTS:${fq_target_name}>
+ DEPENDS ${fq_target_name}
+ )
endif()
endfunction()
>From 052d77aede860b9f42ec3e617793131159fa818c Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Tue, 21 Jul 2026 14:35:59 +0800
Subject: [PATCH 3/8] add llvm-link to exra_deps for gpu build
Signed-off-by: jinge90 <ge.jin at intel.com>
---
llvm/runtimes/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 39db36b661fec..ea93520f53339 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -657,6 +657,9 @@ if(build_runtimes)
if(TARGET clang-nvlink-wrapper)
list(APPEND extra_deps clang-nvlink-wrapper)
endif()
+ if(TARGET llvm-link)
+ list(APPEND extra_deps llvm-link)
+ endif()
endif()
if(LLVM_LIBC_FULL_BUILD)
list(APPEND extra_cmake_args "-DLLVM_LIBC_FULL_BUILD=ON")
>From 7a603d0b80feddf00ace9ffa592a789e8dd52a8b Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Tue, 21 Jul 2026 15:06:18 +0800
Subject: [PATCH 4/8] update amdgpu target in libc cmake cache
Signed-off-by: jinge90 <ge.jin at intel.com>
---
libc/cmake/caches/gpu.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/cmake/caches/gpu.cmake b/libc/cmake/caches/gpu.cmake
index 1867db9ffa12e..cf39fd23d4f9b 100644
--- a/libc/cmake/caches/gpu.cmake
+++ b/libc/cmake/caches/gpu.cmake
@@ -1,4 +1,4 @@
set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "")
-set(LLVM_RUNTIME_TARGETS default;amdgcn-amd-amdhsa;nvptx64-nvidia-cuda CACHE STRING "")
+set(LLVM_RUNTIME_TARGETS default;amdgpu-amd-amdhsa;nvptx64-nvidia-cuda CACHE STRING "")
set(RUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES "compiler-rt;libc" CACHE STRING "")
-set(RUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES "compiler-rt;libc" CACHE STRING "")
+set(RUNTIMES_amdgpu-amd-amdhsa_LLVM_ENABLE_RUNTIMES "compiler-rt;libc" CACHE STRING "")
>From 6976aa9c28ad20bc56e64d500d8f7d8b29805bc0 Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Tue, 21 Jul 2026 16:06:14 +0800
Subject: [PATCH 5/8] fix standalone build
Signed-off-by: jinge90 <ge.jin at intel.com>
---
libc/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index c88455aa3c11d..842d9a109538a 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -289,9 +289,9 @@ endif()
if(LIBC_TARGET_OS_IS_GPU)
include(prepare_libc_gpu_build)
set(LIBC_ENABLE_UNITTESTS OFF)
- find_program(LIBC_LLVM_LINK llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(LIBC_LLVM_LINK llvm-link HINTS ${LLVM_TOOLS_BINARY_DIR})
if(NOT LIBC_LLVM_LINK)
- message(FATAL_ERROR "llvm-link not found in ${LLVM_TOOLS_BINARY_DIR}")
+ message(FATAL_ERROR "llvm-link not found in ${LLVM_TOOLS_BINARY_DIR} or system path")
endif()
elseif(LIBC_TARGET_OS_IS_BAREMETAL)
set(LIBC_ENABLE_UNITTESTS OFF)
>From ce033e8051020bbdfc814d77cb783e21fc0a0578 Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Tue, 21 Jul 2026 16:38:49 +0800
Subject: [PATCH 6/8] pull in llvm-link in libc container
Signed-off-by: jinge90 <ge.jin at intel.com>
---
.github/workflows/containers/libc/Dockerfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/containers/libc/Dockerfile b/.github/workflows/containers/libc/Dockerfile
index 1367b89fab104..f835113487870 100644
--- a/.github/workflows/containers/libc/Dockerfile
+++ b/.github/workflows/containers/libc/Dockerfile
@@ -51,8 +51,8 @@ RUN wget https://apt.llvm.org/llvm.sh && \
# testing CI for libc-based compiler-rt builtins. The package only symlinks
# the tools into /usr/bin under versioned names (lit-23, FileCheck-23, ...),
# so also symlink them under their canonical names.
-RUN apt-get install -y llvm-23-tools && \
- ln -s -t /usr/bin $(dpkg -L llvm-23-tools | grep '^/usr/lib/llvm-23/bin/')
+RUN apt-get install -y llvm-23-tools llvm-23 && \
+ ln -s -t /usr/bin $(dpkg -L llvm-23-tools llvm-23 | grep '^/usr/lib/llvm-23/bin/')
# Install gmp and mpfr for cross compilation
>From 8102e1bd2e7faf86b680b27c6b59175b26693eec Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Tue, 21 Jul 2026 16:58:38 +0800
Subject: [PATCH 7/8] install llvm toolchain all
Signed-off-by: jinge90 <ge.jin at intel.com>
---
.github/workflows/containers/libc/Dockerfile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/containers/libc/Dockerfile b/.github/workflows/containers/libc/Dockerfile
index f835113487870..904052cf70ceb 100644
--- a/.github/workflows/containers/libc/Dockerfile
+++ b/.github/workflows/containers/libc/Dockerfile
@@ -42,7 +42,7 @@ RUN apt-get update && \
RUN wget https://apt.llvm.org/llvm.sh && \
chmod +x llvm.sh && \
- sudo ./llvm.sh 23 && \
+ sudo ./llvm.sh 23 all && \
rm llvm.sh
# Install the LLVM testing tools, which the llvm.sh script above does not
@@ -51,8 +51,8 @@ RUN wget https://apt.llvm.org/llvm.sh && \
# testing CI for libc-based compiler-rt builtins. The package only symlinks
# the tools into /usr/bin under versioned names (lit-23, FileCheck-23, ...),
# so also symlink them under their canonical names.
-RUN apt-get install -y llvm-23-tools llvm-23 && \
- ln -s -t /usr/bin $(dpkg -L llvm-23-tools llvm-23 | grep '^/usr/lib/llvm-23/bin/')
+RUN apt-get install -y llvm-23-tools && \
+ ln -s -t /usr/bin $(dpkg -L llvm-23-tools | grep '^/usr/lib/llvm-23/bin/')
# Install gmp and mpfr for cross compilation
>From 9f1088fc537b5e6712beec2d46df472f253ec746 Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Tue, 21 Jul 2026 17:03:23 +0800
Subject: [PATCH 8/8] revert libc dockfile change
Signed-off-by: jinge90 <ge.jin at intel.com>
---
.github/workflows/containers/libc/Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/containers/libc/Dockerfile b/.github/workflows/containers/libc/Dockerfile
index 904052cf70ceb..1367b89fab104 100644
--- a/.github/workflows/containers/libc/Dockerfile
+++ b/.github/workflows/containers/libc/Dockerfile
@@ -42,7 +42,7 @@ RUN apt-get update && \
RUN wget https://apt.llvm.org/llvm.sh && \
chmod +x llvm.sh && \
- sudo ./llvm.sh 23 all && \
+ sudo ./llvm.sh 23 && \
rm llvm.sh
# Install the LLVM testing tools, which the llvm.sh script above does not
More information about the libc-commits
mailing list