[llvm] [Github][libc] Add qemu-system-hexagon to the libc container (PR #219433)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 01:29:19 PDT 2026
https://github.com/quic-k updated https://github.com/llvm/llvm-project/pull/219433
>From 4c92fd4a91111848ca9ab50d647a532cc5a93db1 Mon Sep 17 00:00:00 2001
From: Kushal Pal <kushpal at qti.qualcomm.com>
Date: Tue, 1 Sep 2026 14:25:49 +0530
Subject: [PATCH] [Github][libc] Download Hexagon qemu in the libc container
Signed-off-by: Kushal Pal <kushpal at qti.qualcomm.com>
---
.github/workflows/containers/libc/Dockerfile | 50 ++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/.github/workflows/containers/libc/Dockerfile b/.github/workflows/containers/libc/Dockerfile
index d2cb71435059a..76bfc79e6801c 100644
--- a/.github/workflows/containers/libc/Dockerfile
+++ b/.github/workflows/containers/libc/Dockerfile
@@ -30,6 +30,7 @@ RUN apt-get update && \
g++-12-arm-linux-gnueabihf \
sudo \
sccache \
+ zstd \
wget \
lsb-release \
software-properties-common \
@@ -40,6 +41,55 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
+# The downloaded Hexagon QEMU binaries are x86_64-only. Install their runtime
+# dependencies only on x86_64 hosts.
+RUN if [ "$(uname -m)" = "x86_64" ]; then \
+ apt-get update && \
+ apt-get install -y \
+ libpixman-1-0 \
+ libslirp0 \
+ libfdt1 \
+ libglib2.0-0 \
+ libfuse3-3 \
+ libiscsi7 \
+ libaio1t64 \
+ liburing2 \
+ libcurl4 \
+ libcurl3t64-gnutls \
+ libasound2t64 \
+ libpulse0 \
+ libjack-jackd2-0 \
+ libsndio7.0 \
+ libsndfile1 \
+ libx11-6 \
+ libx11-xcb1 \
+ libxcb1 \
+ libsystemd0 \
+ libapparmor1 && \
+ ln -s "$(dpkg -L libaio1t64 | grep '/libaio.so.1t64$')" \
+ "$(dirname "$(dpkg -L libaio1t64 | grep '/libaio.so.1t64$')")/libaio.so.1" && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*; \
+ fi
+
+# TODO: Switch to distribution QEMU packages once the Qualcomm fork patches
+# are upstreamed to QEMU.
+# The current QEMU binaries are x86_64-only, so do not install them on ARM.
+RUN if [ "$(uname -m)" = "x86_64" ]; then \
+ wget --remote-encoding=utf-8 -O /tmp/clang+llvm-23.1.0-rc1-cross-hexagon-unknown-linux-musl.tar.zst \
+ https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/23.1.0-rc1/clang+llvm-23.1.0-rc1-cross-hexagon-unknown-linux-musl.tar.zst && \
+ mkdir -p /tmp/hexagon-toolchain && \
+ tar -xf /tmp/clang+llvm-23.1.0-rc1-cross-hexagon-unknown-linux-musl.tar.zst -C /tmp/hexagon-toolchain/ && \
+ install "$(find /tmp/hexagon-toolchain -type f -name qemu-system-hexagon -print -quit)" \
+ /usr/local/bin/qemu-system-hexagon && \
+ install "$(find /tmp/hexagon-toolchain -type f -name qemu-hexagon -print -quit)" \
+ /usr/local/bin/qemu-hexagon && \
+ qemu-system-hexagon --version && \
+ qemu-hexagon --version && \
+ rm -rf /tmp/hexagon-toolchain && \
+ rm -f /tmp/clang+llvm-23.1.0-rc1-cross-hexagon-unknown-linux-musl.tar.zst; \
+ fi
+
RUN wget https://apt.llvm.org/llvm.sh && \
chmod +x llvm.sh && \
sudo ./llvm.sh 23 && \
More information about the llvm-commits
mailing list