Skip to content

[Github] Install llvm-tools in libc container#210414

Merged
hulxv merged 2 commits into
llvm:mainfrom
hulxv:github/workflows/containers/libc/install-llvm-tools
Jul 18, 2026
Merged

[Github] Install llvm-tools in libc container#210414
hulxv merged 2 commits into
llvm:mainfrom
hulxv:github/workflows/containers/libc/install-llvm-tools

Conversation

@hulxv

@hulxv hulxv commented Jul 17, 2026

Copy link
Copy Markdown
Member

Currently, the libc container doesn't contain llvm-tools. we need to use them in #200196 because we are not able to use llvm-lit without building clang from source

@boomanaiden154 boomanaiden154 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is

Comment thread .github/workflows/containers/libc/Dockerfile Outdated
Comment thread .github/workflows/containers/libc/Dockerfile Outdated
@hulxv
hulxv force-pushed the github/workflows/containers/libc/install-llvm-tools branch from f0a5703 to 8f440a7 Compare July 18, 2026 19:33
@hulxv
hulxv requested a review from boomanaiden154 July 18, 2026 19:34
@hulxv
hulxv force-pushed the github/workflows/containers/libc/install-llvm-tools branch from 8f440a7 to 2300b53 Compare July 18, 2026 19:38
@hulxv
hulxv marked this pull request as ready for review July 18, 2026 21:29
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-github-workflow

Author: hulxv (hulxv)

Changes

Currently, the libc container doesn't contain llvm-tools. we need to use them in #200196 because we are not able to use llvm-lit without building clang from source


Full diff: https://github.com/llvm/llvm-project/pull/210414.diff

1 Files Affected:

  • (modified) .github/workflows/containers/libc/Dockerfile (+2)
diff --git a/.github/workflows/containers/libc/Dockerfile b/.github/workflows/containers/libc/Dockerfile
index 69f5b11cead62..063eb76326fb3 100644
--- a/.github/workflows/containers/libc/Dockerfile
+++ b/.github/workflows/containers/libc/Dockerfile
@@ -45,6 +45,8 @@ RUN wget https://apt.llvm.org/llvm.sh && \
     sudo ./llvm.sh 23 && \
     rm llvm.sh
 
+RUN apt-get install -y llvm-23-tools
+
 # Install gmp and mpfr for cross compilation
 RUN wget https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz && \
     tar -xf gmp-6.3.0.tar.xz && \

@boomanaiden154 boomanaiden154 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

sudo ./llvm.sh 23 && \
rm llvm.sh

RUN apt-get install -y llvm-23-tools

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment on why this is needed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@hulxv
hulxv enabled auto-merge (squash) July 18, 2026 23:30
@hulxv
hulxv merged commit 84b9da6 into llvm:main Jul 18, 2026
18 checks passed
hulxv added a commit that referenced this pull request Jul 19, 2026
Missed thing in #210414. We need to symlink the LLVM tools that are
under `/usr/lib/llvm-23/bin/` to avoid errors like this because the LLVM
tools have a `-23` suffix when they're installed inside the container

```
# RUN: at line 2
/usr/bin/clang-23   -gline-tables-only   -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta  -DCOMPILER_RT_HAS_FLOAT16 -nobuiltininc -I/__w/llvm-project/llvm-project/compiler-rt/include -idirafter /usr/lib/llvm-23/lib/clang/23/include -resource-dir=/__w/llvm-project/llvm-project/build/compiler-rt -Wl,-rpath,/__w/llvm-project/llvm-project/build/compiler-rt/lib/linux  -fno-builtin -I /__w/llvm-project/llvm-project/compiler-rt/lib/builtins -nodefaultlibs /__w/llvm-project/llvm-project/compiler-rt/test/builtins/Unit/aarch64/emupac.c -lm -Wl,--start-group /__w/llvm-project/llvm-project/build/compiler-rt/lib/linux/libclang_rt.builtins-aarch64.a -lc -Wl,--end-group -o /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/aarch64/Output/emupac.c.tmp
# executed command: /usr/bin/clang-23 -gline-tables-only -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -DCOMPILER_RT_HAS_FLOAT16 -nobuiltininc -I/__w/llvm-project/llvm-project/compiler-rt/include -idirafter /usr/lib/llvm-23/lib/clang/23/include -resource-dir=/__w/llvm-project/llvm-project/build/compiler-rt -Wl,-rpath,/__w/llvm-project/llvm-project/build/compiler-rt/lib/linux -fno-builtin -I /__w/llvm-project/llvm-project/compiler-rt/lib/builtins -nodefaultlibs /__w/llvm-project/llvm-project/compiler-rt/test/builtins/Unit/aarch64/emupac.c -lm -Wl,--start-group /__w/llvm-project/llvm-project/build/compiler-rt/lib/linux/libclang_rt.builtins-aarch64.a -lc -Wl,--end-group -o /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/aarch64/Output/emupac.c.tmp
# RUN: at line 3
/__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/aarch64/Output/emupac.c.tmp 1
# executed command: /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/aarch64/Output/emupac.c.tmp 1
# RUN: at line 4
/__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/aarch64/Output/emupac.c.tmp 2
# executed command: /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/aarch64/Output/emupac.c.tmp 2
# RUN: at line 5
not --crash  /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/aarch64/Output/emupac.c.tmp 3
# executed command: not --crash /__w/llvm-project/llvm-project/build/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/aarch64/Output/emupac.c.tmp 3
# .---command stderr------------
# | 'not': command not found
# `-----------------------------
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants