Create symlink for llvm-link in libc docker image#210929
Conversation
Signed-off-by: jinge90 <ge.jin@intel.com>
|
@llvm/pr-subscribers-github-workflow Author: jinge90 ChangesFull diff: https://github.com/llvm/llvm-project/pull/210929.diff 1 Files Affected:
diff --git a/.github/workflows/containers/libc/Dockerfile b/.github/workflows/containers/libc/Dockerfile
index 1367b89fab104..1794ea3f3da8b 100644
--- a/.github/workflows/containers/libc/Dockerfile
+++ b/.github/workflows/containers/libc/Dockerfile
@@ -51,8 +51,10 @@ 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/')
+# Also install LLVM tools to include llvm-link, we use it to build bitcode
+# for GPU targets.
+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
|
boomanaiden154
left a comment
There was a problem hiding this comment.
There's no package more specific than general llvm-23 that would work here?
Hi, @boomanaiden154 Thanks very much. |
boomanaiden154
left a comment
There was a problem hiding this comment.
Can you collect numbers on how much this increases the container image size?
Hi, @boomanaiden154 |
Then can we just create a symlink rather than installing additional packages? |
Hi, @boomanaiden154
Thanks very much. |
This I'm a bit skeptical of, but if I guess
This argument does not make any sense to me. Neither |
Hi, @boomanaiden154 |
Signed-off-by: jinge90 <ge.jin@intel.com>
Hi, @boomanaiden154 |
Signed-off-by: jinge90 <ge.jin@intel.com>
boomanaiden154
left a comment
There was a problem hiding this comment.
Can you collect numbers on how much this increases the container image size?
| ln -s -t /usr/bin $(dpkg -L llvm-23-tools | grep '^/usr/lib/llvm-23/bin/') | ||
|
|
||
| # llvm-link is required to build bitcode library for GPU targets | ||
| RUN if [ ! -e /usr/bin/llvm-link ]; then \ |
There was a problem hiding this comment.
We can drop the if statement and only keep the ln -s command, and also fold this into the previous RUN line.
There was a problem hiding this comment.
Hi, @boomanaiden154
Done.
Thanks very much.
Signed-off-by: jinge90 <ge.jin@intel.com>
Hi, @boomanaiden154 |
We are working on using llvm-link to build LLVM libc bitcode library for GPU targets. In standalone build environment which amd-gpu pre-ci uses, only clang-23, clang++-23, lld-23 and llvm-23-tools are installed and added to /usr/bin path. This PR creates symlink for llvm-link.