b9052d3634
The current docker image for cross compiling hexagon guests is manually built since it takes >2 hours to build from source. This patch: 1. Solves the above issue by using the prebuilt clang toolchain hosted on CodeLinaro [1] and maintained by QUIC [2]. 2. The dockerfile is also switched from multi-stage to single stage build to allow the CI docker engine to reuse the layer cache. 3. Re-enables the hexagon-cross-container job to be always run in CI and makes it a non-optional dependency for the build-user-hexagon job. The changes for 1 & 2 together bring down the build time to ~3 minutes in GitLab CI when cache is reused and ~9 minutes when cache cannot be reused. [1]: https://github.com/CodeLinaro/hexagon-builder [2]: https://github.com/quic/toolchain_for_hexagon/releases/ Signed-off-by: Mukilan Thiyagarajan <quic_mthiyaga@quicinc.com> [AJB: also tweak MAINTAINERS, remove QEMU_JOB_ONLY_FORKS and comment] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20221219144354.11659-1-quic_mthiyaga@quicinc.com> Message-Id: <20221221090411.1995037-6-alex.bennee@linaro.org>
36 lines
1.2 KiB
Docker
36 lines
1.2 KiB
Docker
#
|
|
# Docker Hexagon cross-compiler target
|
|
#
|
|
# This docker target is used for building hexagon tests. As it also
|
|
# needs to be able to build QEMU itself in CI we include its
|
|
# build-deps.
|
|
#
|
|
FROM docker.io/library/debian:11-slim
|
|
|
|
# Duplicate deb line as deb-src
|
|
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
# Install common build utilities
|
|
apt-get install -y --no-install-recommends \
|
|
curl \
|
|
xz-utils \
|
|
ca-certificates \
|
|
bison \
|
|
flex \
|
|
git \
|
|
ninja-build && \
|
|
# Install QEMU build deps for use in CI
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt build-dep -yy --arch-only qemu
|
|
|
|
|
|
ENV TOOLCHAIN_INSTALL /opt
|
|
ENV TOOLCHAIN_RELEASE 15.0.3
|
|
ENV TOOLCHAIN_BASENAME "clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl"
|
|
ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/v${TOOLCHAIN_RELEASE}/${TOOLCHAIN_BASENAME}.tar.xz
|
|
|
|
RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL"
|
|
ENV PATH $PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin
|