Skip to content

Commit a745b60

Browse files
committed
Only use linker-flavor=gnu-cc if we're actually going to compare the 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.
1 parent 9d6a1c9 commit a745b60

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/run-make/linker-warning/rmake.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ fn run_rustc() -> Rustc {
77
// NOTE: `link-self-contained` can vary depending on config.toml.
88
// Make sure we use a consistent value.
99
.arg("-Clink-self-contained=-linker")
10-
.arg("-Clinker-flavor=gnu-cc")
1110
.arg("-Zunstable-options")
1211
.output("main")
1312
.linker("./fake-linker");
13+
if run_make_support::target() == "x86_64-unknown-linux-gnu" {
14+
// The value of `rust.lld` is different between CI and locally. Override it explicitly.
15+
rustc.arg("-Clinker-flavor=gnu-cc");
16+
}
1417
rustc
1518
}
1619

0 commit comments

Comments
 (0)