Skip to content

Commit

Permalink
Only use linker-flavor=gnu-cc if we're actually going to compare the …
Browse files Browse the repository at this point in the history
…output

It doesn't exist on MacOS.

It's strange to me why the flavor is platform specific; I would expect you to be able to use any userspace on any OS? But trying to do this outside of Linux is already kinda weird, so.
  • Loading branch information
jyn514 committed Jan 22, 2025
1 parent 9d6a1c9 commit a745b60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/run-make/linker-warning/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ fn run_rustc() -> Rustc {
// NOTE: `link-self-contained` can vary depending on config.toml.
// Make sure we use a consistent value.
.arg("-Clink-self-contained=-linker")
.arg("-Clinker-flavor=gnu-cc")
.arg("-Zunstable-options")
.output("main")
.linker("./fake-linker");
if run_make_support::target() == "x86_64-unknown-linux-gnu" {
// The value of `rust.lld` is different between CI and locally. Override it explicitly.
rustc.arg("-Clinker-flavor=gnu-cc");
}
rustc
}

Expand Down

0 comments on commit a745b60

Please sign in to comment.