Enable msvc for link-args-order
This commit is contained in:
parent
ebd08d8ed5
commit
3268b2e18d
@ -3,15 +3,14 @@
|
|||||||
// checks that linker arguments remain intact and in the order they were originally passed in.
|
// checks that linker arguments remain intact and in the order they were originally passed in.
|
||||||
// See https://github.com/rust-lang/rust/pull/70665
|
// See https://github.com/rust-lang/rust/pull/70665
|
||||||
|
|
||||||
//@ ignore-msvc
|
use run_make_support::{is_msvc, rustc};
|
||||||
// Reason: the ld linker does not exist on Windows.
|
|
||||||
|
|
||||||
use run_make_support::rustc;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let linker = if is_msvc() { "msvc" } else { "ld" };
|
||||||
|
|
||||||
rustc()
|
rustc()
|
||||||
.input("empty.rs")
|
.input("empty.rs")
|
||||||
.linker_flavor("ld")
|
.linker_flavor(linker)
|
||||||
.link_arg("a")
|
.link_arg("a")
|
||||||
.link_args("b c")
|
.link_args("b c")
|
||||||
.link_args("d e")
|
.link_args("d e")
|
||||||
@ -20,7 +19,7 @@ fn main() {
|
|||||||
.assert_stderr_contains(r#""a" "b" "c" "d" "e" "f""#);
|
.assert_stderr_contains(r#""a" "b" "c" "d" "e" "f""#);
|
||||||
rustc()
|
rustc()
|
||||||
.input("empty.rs")
|
.input("empty.rs")
|
||||||
.linker_flavor("ld")
|
.linker_flavor(linker)
|
||||||
.arg("-Zpre-link-arg=a")
|
.arg("-Zpre-link-arg=a")
|
||||||
.arg("-Zpre-link-args=b c")
|
.arg("-Zpre-link-args=b c")
|
||||||
.arg("-Zpre-link-args=d e")
|
.arg("-Zpre-link-args=d e")
|
||||||
|
Loading…
Reference in New Issue
Block a user