Skip to content

Make run-make testsuite work with other codegen backend than LLVM - #162482

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
GuillaumeGomez:run-make-backends
Sep 9, 2026
Merged

Make run-make testsuite work with other codegen backend than LLVM#162482
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
GuillaumeGomez:run-make-backends

Conversation

@GuillaumeGomez

@GuillaumeGomez GuillaumeGomez commented Sep 8, 2026

Copy link
Copy Markdown
Member

Needed for #159924.

Currently, we always run run-make testsuite with the codegen backend rustc was compiled with. However, in CI it's compiled with LLVM, so when we want to test with GCC (with --test-codegen-backend), it compiles rmake.rs with the GCC backend, but when running the test, it doesn't use the GCC backend since it just calls rustc. So to get around that, I now pass the codegen backend through the environment and set it in the rustc function of run_make_support.

To be noted that for now it's only for the rustc function, no other command uses it. Should I extend it right away for all commands (well, likely only cargo) or just rustc for now is enough?

r? @jieyouxu

@rustbot

rustbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/compiletest

cc @jieyouxu

The run-make-support library was changed

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 8, 2026
@rustbot

rustbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

jieyouxu is currently at their maximum review capacity.
They may take a while to respond.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Ah, let's set someone else then.

r? @Kobzol

@rustbot rustbot assigned Kobzol and unassigned jieyouxu Sep 8, 2026
@rustbot

rustbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@Kobzol Kobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment, otherwise looks reasonable, I agree that run-make tests should respect the selected codegen backend.

View changes since this review

Comment thread src/tools/compiletest/src/runtest/run_make.rs Outdated
Comment thread src/tools/run-make-support/src/external_deps/rustc.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Updated.

@Kobzol

Kobzol commented Sep 8, 2026

Copy link
Copy Markdown
Member

Thanks, looks good.

@bors r+

@rust-bors

rust-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5dffd45 has been approved by Kobzol

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

Reason for tree closure: spurious failures

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 8, 2026
…r=Kobzol

Make `run-make` testsuite work with other codegen backend than LLVM

Needed for rust-lang#159924.

Currently, we always run `run-make` testsuite with the codegen backend rustc was compiled with. However, in CI it's compiled with LLVM, so when we want to test with GCC (with `--test-codegen-backend`), it compiles `rmake.rs` with the GCC backend, but when running the test, it doesn't use the GCC backend since it just calls `rustc`. So to get around that, I now pass the codegen backend through the environment and set it in the `rustc` function of `run_make_support`.

To be noted that for now it's only for the `rustc` function, no other command uses it. Should I extend it right away for all commands (well, likely only `cargo`) or just `rustc` for now is enough?

r? @jieyouxu
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Seems like I need to fix some tests first. :')

@bors r-

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 8, 2026
@rust-bors

rust-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#162486), which was unapproved.

View changes since this unapproval

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

We still have quite a few tests we need to fix in the GCC backend. For now, I marked them as ignored for the GCC backend. But it's nice since we have a new list of regression tests we'll be able to use. =D

@Kobzol

Kobzol commented Sep 8, 2026

Copy link
Copy Markdown
Member

Why only some tests have FIXMEs, the others are LLVM only? Anyway, feel free to r=me once PR CI is green :)

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Why only some tests have FIXMEs, the others are LLVM only? Anyway, feel free to r=me once PR CI is green :)

Because the ones with the llvm components, I'm not sure they're relevant for gcc backend.

… works for them

Limit some `run-make` tests to LLVM until GCC backend works for them
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Seems like CI is happy, let's go. =D

@bors r=Kobzol

@rust-bors

rust-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 21cfbad has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 8, 2026
mu001999 added a commit to mu001999/rust that referenced this pull request Sep 9, 2026
…r=Kobzol

Make `run-make` testsuite work with other codegen backend than LLVM

Needed for rust-lang#159924.

Currently, we always run `run-make` testsuite with the codegen backend rustc was compiled with. However, in CI it's compiled with LLVM, so when we want to test with GCC (with `--test-codegen-backend`), it compiles `rmake.rs` with the GCC backend, but when running the test, it doesn't use the GCC backend since it just calls `rustc`. So to get around that, I now pass the codegen backend through the environment and set it in the `rustc` function of `run_make_support`.

To be noted that for now it's only for the `rustc` function, no other command uses it. Should I extend it right away for all commands (well, likely only `cargo`) or just `rustc` for now is enough?

r? @jieyouxu
rust-bors Bot pushed a commit that referenced this pull request Sep 9, 2026
Rollup of 6 pull requests

Successful merges:

 - #162482 (Make `run-make` testsuite work with other codegen backend than LLVM)
 - #161587 (Avoid invalid suggestion in case of macro expansion without inferrable generic type)
 - #162363 (Use correct `dir_path` when parsing module from path)
 - #162408 (add crashtests [7/N])
 - #162502 (triagebot: Subscribe me to amdgpu changes)
 - #162505 (Revert "fuchsia: Add safestack as a supported sanitizer for x86_64 fuchsia")
@rust-bors
rust-bors Bot merged commit b604379 into rust-lang:main Sep 9, 2026
13 checks passed
rust-bors Bot pushed a commit that referenced this pull request Sep 9, 2026
Rollup merge of #162482 - GuillaumeGomez:run-make-backends, r=Kobzol

Make `run-make` testsuite work with other codegen backend than LLVM

Needed for #159924.

Currently, we always run `run-make` testsuite with the codegen backend rustc was compiled with. However, in CI it's compiled with LLVM, so when we want to test with GCC (with `--test-codegen-backend`), it compiles `rmake.rs` with the GCC backend, but when running the test, it doesn't use the GCC backend since it just calls `rustc`. So to get around that, I now pass the codegen backend through the environment and set it in the `rustc` function of `run_make_support`.

To be noted that for now it's only for the `rustc` function, no other command uses it. Should I extend it right away for all commands (well, likely only `cargo`) or just `rustc` for now is enough?

r? @jieyouxu
@rustbot rustbot added this to the 1.100.0 milestone Sep 9, 2026
@GuillaumeGomez
GuillaumeGomez deleted the run-make-backends branch September 9, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants