Skip to content

Commit

Permalink
Rollup merge of rust-lang#128647 - ChrisDenton:link-args-order, r=jie…
Browse files Browse the repository at this point in the history
…youxu

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
  • Loading branch information
ChrisDenton authored Aug 5, 2024
2 parents 702a8cc + 3268b2e commit 10f32e1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/run-make/link-args-order/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
// checks that linker arguments remain intact and in the order they were originally passed in.
// See https://github.com/rust-lang/rust/pull/70665

//@ ignore-msvc
// Reason: the ld linker does not exist on Windows.

use run_make_support::rustc;
use run_make_support::{is_msvc, rustc};

fn main() {
let linker = if is_msvc() { "msvc" } else { "ld" };

rustc()
.input("empty.rs")
.linker_flavor("ld")
.linker_flavor(linker)
.link_arg("a")
.link_args("b c")
.link_args("d e")
Expand All @@ -20,7 +19,7 @@ fn main() {
.assert_stderr_contains(r#""a" "b" "c" "d" "e" "f""#);
rustc()
.input("empty.rs")
.linker_flavor("ld")
.linker_flavor(linker)
.arg("-Zpre-link-arg=a")
.arg("-Zpre-link-args=b c")
.arg("-Zpre-link-args=d e")
Expand Down

0 comments on commit 10f32e1

Please sign in to comment.