Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable rustc_codegen_gcc tests in CI #118463

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 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 Down
3 changes: 3 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 Down
9 changes: 2 additions & 7 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,9 @@ touch $objdir/${SUMMARY_FILE}

extra_env=""
if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then
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 ENABLE_GCC_CODEGEN=1"
cuviper marked this conversation as resolved.
Show resolved Hide resolved
# 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
8 changes: 8 additions & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ if [ "$IS_NOT_LATEST_LLVM" = "" ]; then
export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1
fi

if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then
# 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.
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-new-symbol-mangling"
fi

# Print the date from the local machine and the date from an external source to
# check for clock drifts. An HTTP URL is used instead of HTTPS since on Azure
# Pipelines it happened that the certificates were marked as expired.
Expand Down
Loading