Skip to content

Commit

Permalink
Re-enable rustc_codegen_gcc tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Nov 29, 2023
1 parent b10cfcd commit 0a3fd37
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
xz-utils \
nodejs \
mingw-w64 \
libgccjit-12-dev \
&& rm -rf /var/lib/apt/lists/*

# Note: libgccjit needs to match the default gcc version for the linker to find it.

# Install powershell (universal package) so we can test x.ps1 on Linux
RUN curl -sL "/~https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
dpkg -i powershell.deb && \
Expand All @@ -47,6 +50,7 @@ ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--llvm-root=/usr/lib/llvm-16 \
--enable-llvm-link-shared \
$USE_NEW_MANGLING \
--set rust.thin-lto-import-instr-limit=10

COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/
Expand Down
4 changes: 4 additions & 0 deletions src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
xz-utils \
nodejs \
mingw-w64 \
libgccjit-13-dev \
&& rm -rf /var/lib/apt/lists/*

# Note: libgccjit needs to match the default gcc version for the linker to find it.

# Install powershell (universal package) so we can test x.ps1 on Linux
RUN curl -sL "/~https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
dpkg -i powershell.deb && \
Expand All @@ -43,6 +46,7 @@ ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--llvm-root=/usr/lib/llvm-17 \
--enable-llvm-link-shared \
$USE_NEW_MANGLING \
--set rust.thin-lto-import-instr-limit=10

COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/
Expand Down
6 changes: 3 additions & 3 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,14 @@ touch $objdir/${SUMMARY_FILE}

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

Expand Down

0 comments on commit 0a3fd37

Please sign in to comment.