Run rust tests with GCC backend

This commit is contained in:
Guillaume Gomez 2025-09-10 16:41:09 +02:00
parent 956f47c32f
commit 287e458dae
3 changed files with 55 additions and 1 deletions

View file

@ -0,0 +1,45 @@
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
g++ \
make \
ninja-build \
file \
curl \
ca-certificates \
python3 \
git \
cmake \
sudo \
gdb \
libssl-dev \
pkg-config \
xz-utils \
mingw-w64 \
zlib1g-dev \
libzstd-dev \
# libgccjit dependencies
flex \
libmpfr-dev \
libgmp-dev \
libmpc3 \
libmpc-dev \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--enable-sanitizers \
--enable-profiler \
--enable-compiler-docs \
--set llvm.libzstd=true \
--set 'rust.codegen-backends=[\"llvm\",\"gcc\"]'
ENV SCRIPT python3 ../x.py \
--stage 2 \
test \
--test-codegen-backend gcc \
--set 'rust.codegen-backends=[\"llvm\",\"gcc\"]'

View file

@ -141,6 +141,9 @@ pr:
<<: *job-linux-4c
- name: x86_64-gnu-miri
<<: *job-linux-4c
- name: x86_64-gnu-gcc
doc_url: https://rustc-dev-guide.rust-lang.org/tests/codegen-backend-tests/cg_gcc.html
<<: *job-linux-4c
# Jobs that run when you perform a try build (@bors try)
# These jobs automatically inherit envs.try, to avoid repeating
@ -348,6 +351,10 @@ auto:
- name: x86_64-gnu
<<: *job-linux-4c
- name: x86_64-gnu-gcc
doc_url: https://rustc-dev-guide.rust-lang.org/tests/codegen-backend-tests/cg_gcc.html
<<: *job-linux-4c
# This job ensures commits landing on nightly still pass the full
# test suite on the stable channel. There are some UI tests that
# depend on the channel being built (for example if they include the

View file

@ -188,7 +188,9 @@ else
fi
# Download GCC from CI on test builders
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set gcc.download-ci-gcc=true"
# FIXME: Temporarily commented out until the GCC build/download strategy is cleared out or
# made dependent on GCC submodule changes.
# RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set gcc.download-ci-gcc=true"
# download-rustc seems to be broken on CI after the stage0 redesign
# Disable it until these issues are debugged and resolved