Skip to content

Couple of test suite fixes for cg_clif #142955

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

Merged
merged 3 commits into from
Jun 25, 2025
Merged

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Jun 24, 2025

Most of these are required for getting the test suite running with panic=unwind for cg_clif.

bjorn3 added 3 commits June 24, 2025 09:06
Ensure rustc_codegen_cranelift doesn't get normalized to rustc. And
handle -Cpanic=abort.
While cg_llvm is very lax about mismatched function signatures, cg_clif
will crash when there is any mismatch. It could be turned into an error,
but without Cranelift changes can't just be ignored.
cg_llvm likely just optimizes out their references for these tests, but
cg_clif doesn't and would thus give a linker error.
@bjorn3 bjorn3 added the A-cranelift Things relevant to the [future] cranelift backend label Jun 24, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 24, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 24, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 24, 2025

This PR modifies run-make tests.

cc @jieyouxu

_exception_class: u64,
_exception_object: *mut (),
_context: *mut (),
) -> i32 {
Copy link
Member Author

Choose a reason for hiding this comment

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

This signature does technically depend on the exact unwinding mechanism used, but it is unlikely that cg_clif will support an unwinding mechanism that needs a different signature for the foreseeable future and cg_llvm doesn't care about signature mismatches anyway.

@@ -57,7 +57,8 @@ fn main() {
diff()
.expected_file("short-error.txt")
.actual_text("(linker error)", out.stderr())
.normalize(r#"/rustc[^/]*/"#, "/rustc/")
.normalize(r#"/rustc[^/_-]*/"#, "/rustc/")
Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't exactly match the patch I had been carrying on the cg_clif side, but it should be more robust against future moves of the temp directory.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks

@jieyouxu
Copy link
Member

r? jieyouxu @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 24, 2025

📌 Commit 659da58 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors 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 Jun 24, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 24, 2025
Couple of test suite fixes for cg_clif

Most of these are required for getting the test suite running with panic=unwind for cg_clif.
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 25, 2025
Couple of test suite fixes for cg_clif

Most of these are required for getting the test suite running with panic=unwind for cg_clif.
bors added a commit that referenced this pull request Jun 25, 2025
Rollup of 15 pull requests

Successful merges:

 - #135731 (Implement parsing of pinned borrows)
 - #138780 (Add `#[loop_match]` for improved DFA codegen)
 - #142453 (Windows: make `read_dir` stop iterating after the first error is encountered)
 - #142633 (Error on invalid signatures for interrupt ABIs)
 - #142768 (Avoid a bitcast FFI call in transmuting)
 - #142825 (Port `#[track_caller]` to the new attribute system)
 - #142844 (Enable short-ice for Windows)
 - #142934 (Tweak `-Zmacro-stats` measurement.)
 - #142955 (Couple of test suite fixes for cg_clif)
 - #142977 (rustdoc: Don't mark `#[target_feature]` functions as ⚠)
 - #142980 (Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect)
 - #142982 (Corrected spelling mistake in c_str.rs)
 - #142983 (Taint body on invalid call ABI)
 - #142988 (Update wasm-component-ld to 0.5.14)
 - #142993 (Update cargo)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c062c49 into rust-lang:master Jun 25, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jun 25, 2025
rust-timer added a commit that referenced this pull request Jun 25, 2025
Rollup merge of #142955 - bjorn3:cg_clif_test_fixes, r=jieyouxu

Couple of test suite fixes for cg_clif

Most of these are required for getting the test suite running with panic=unwind for cg_clif.
@bjorn3 bjorn3 deleted the cg_clif_test_fixes branch June 25, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cranelift Things relevant to the [future] cranelift backend A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants