Skip to content

Commit 0a3fd37

Browse files
committed
Re-enable rustc_codegen_gcc tests in CI
1 parent b10cfcd commit 0a3fd37

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2424
xz-utils \
2525
nodejs \
2626
mingw-w64 \
27+
libgccjit-12-dev \
2728
&& rm -rf /var/lib/apt/lists/*
2829

30+
# Note: libgccjit needs to match the default gcc version for the linker to find it.
31+
2932
# Install powershell (universal package) so we can test x.ps1 on Linux
3033
RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
3134
dpkg -i powershell.deb && \
@@ -47,6 +50,7 @@ ENV RUST_CONFIGURE_ARGS \
4750
--build=x86_64-unknown-linux-gnu \
4851
--llvm-root=/usr/lib/llvm-16 \
4952
--enable-llvm-link-shared \
53+
$USE_NEW_MANGLING \
5054
--set rust.thin-lto-import-instr-limit=10
5155

5256
COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/

src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2424
xz-utils \
2525
nodejs \
2626
mingw-w64 \
27+
libgccjit-13-dev \
2728
&& rm -rf /var/lib/apt/lists/*
2829

30+
# Note: libgccjit needs to match the default gcc version for the linker to find it.
31+
2932
# Install powershell (universal package) so we can test x.ps1 on Linux
3033
RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
3134
dpkg -i powershell.deb && \
@@ -43,6 +46,7 @@ ENV RUST_CONFIGURE_ARGS \
4346
--build=x86_64-unknown-linux-gnu \
4447
--llvm-root=/usr/lib/llvm-17 \
4548
--enable-llvm-link-shared \
49+
$USE_NEW_MANGLING \
4650
--set rust.thin-lto-import-instr-limit=10
4751

4852
COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/

src/ci/docker/run.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,14 @@ touch $objdir/${SUMMARY_FILE}
269269

270270
extra_env=""
271271
if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then
272-
extra_env="$EXTRA_ENV --env ENABLE_GCC_CODEGEN=1"
272+
extra_env="$extra_env --env ENABLE_GCC_CODEGEN=1"
273273
# If `ENABLE_GCC_CODEGEN` is set and not empty, we add the `--enable-new-symbol-mangling`
274274
# argument to `RUST_CONFIGURE_ARGS` and set the `GCC_EXEC_PREFIX` environment variable.
275275
# `cg_gcc` doesn't support the legacy mangling so we need to enforce the new one
276276
# if we run `cg_gcc` tests.
277-
extra_env="$EXTRA_ENV --env USE_NEW_MANGLING=--enable-new-symbol-mangling"
277+
extra_env="$extra_env --env USE_NEW_MANGLING=--enable-new-symbol-mangling"
278278
# Fix rustc_codegen_gcc lto issues.
279-
extra_env="$EXTRA_ENV --env GCC_EXEC_PREFIX=/usr/lib/gcc/"
279+
extra_env="$extra_env --env GCC_EXEC_PREFIX=/usr/lib/gcc/"
280280
echo "Setting extra environment values for docker: $extra_env"
281281
fi
282282

0 commit comments

Comments
 (0)