Skip to content

Commit 10f32e1

Browse files
authored
Rollup merge of rust-lang#128647 - ChrisDenton:link-args-order, r=jieyouxu
Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
2 parents 702a8cc + 3268b2e commit 10f32e1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/run-make/link-args-order/rmake.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
// checks that linker arguments remain intact and in the order they were originally passed in.
44
// See https://github.com/rust-lang/rust/pull/70665
55

6-
//@ ignore-msvc
7-
// Reason: the ld linker does not exist on Windows.
8-
9-
use run_make_support::rustc;
6+
use run_make_support::{is_msvc, rustc};
107

118
fn main() {
9+
let linker = if is_msvc() { "msvc" } else { "ld" };
10+
1211
rustc()
1312
.input("empty.rs")
14-
.linker_flavor("ld")
13+
.linker_flavor(linker)
1514
.link_arg("a")
1615
.link_args("b c")
1716
.link_args("d e")
@@ -20,7 +19,7 @@ fn main() {
2019
.assert_stderr_contains(r#""a" "b" "c" "d" "e" "f""#);
2120
rustc()
2221
.input("empty.rs")
23-
.linker_flavor("ld")
22+
.linker_flavor(linker)
2423
.arg("-Zpre-link-arg=a")
2524
.arg("-Zpre-link-args=b c")
2625
.arg("-Zpre-link-args=d e")

0 commit comments

Comments
 (0)