Skip to content

Commit

Permalink
Add comment explaining why the ENABLE_GCC_CODEGEN env variable is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 2, 2023
1 parent 2dbe7d8 commit 30a0709
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -ex

# Only run the stage 1 tests on merges, not on PR CI jobs.
if [[ -z "${PR_CI_JOB}" ]]; then
# When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen
# tests as it will fail them.
if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then
../x.py --stage 1 test --skip src/tools/tidy --skip tests/codegen
else
Expand All @@ -23,6 +25,8 @@ if [[ -z "${PR_CI_JOB}" ]]; then
../x.py --stage 1 test tests/ui-fulldeps
fi

# When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen
# tests as it will fail them.
# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then
../x.py --stage 2 test --skip src/tools/tidy --skip tests/codegen
Expand Down
6 changes: 4 additions & 2 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,13 @@ else

RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"

# When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen
# tests as it will fail them.
if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then
# Test the Cranelift backend in CI. Bootstrap knows which targets to run tests on.
# Test the Cranelift and GCC backends in CI. Bootstrap knows which targets to run tests on.
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=llvm,cranelift,gcc"
else
# Test the Cranelift and GCC backends in CI. Bootstrap knows which targets to run tests on.
# Test the Cranelift backend in CI. Bootstrap knows which targets to run tests on.
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=llvm,cranelift"
fi

Expand Down

0 comments on commit 30a0709

Please sign in to comment.