add post-dist test for checking that we use LLD
And remove the previous beta/stable/nightly LLD tests.
This commit is contained in:
parent
a4ea949356
commit
aa52711543
7 changed files with 32 additions and 22 deletions
|
|
@ -106,7 +106,10 @@ llvm-config = "{llvm_config}"
|
|||
"tests/incremental",
|
||||
"tests/mir-opt",
|
||||
"tests/pretty",
|
||||
// Make sure that we don't use too new GLIBC symbols on x64
|
||||
"tests/run-make/glibc-symbols-x86_64-unknown-linux-gnu",
|
||||
// Make sure that we use LLD by default on x64
|
||||
"tests/run-make/rust-lld-x86_64-unknown-linux-gnu-dist",
|
||||
"tests/ui",
|
||||
"tests/crashes",
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
fn main() {}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
// Ensure that rust-lld is *not* used as the default linker on `x86_64-unknown-linux-gnu` on stable
|
||||
// or beta.
|
||||
|
||||
//@ ignore-nightly
|
||||
//@ only-x86_64-unknown-linux-gnu
|
||||
|
||||
use run_make_support::linker::assert_rustc_doesnt_use_lld;
|
||||
use run_make_support::rustc;
|
||||
|
||||
fn main() {
|
||||
// A regular compilation should not use rust-lld by default. We'll check that by asking the
|
||||
// linker to display its version number with a link-arg.
|
||||
assert_rustc_doesnt_use_lld(rustc().input("main.rs"));
|
||||
}
|
||||
|
|
@ -1,17 +1,14 @@
|
|||
// Ensure that rust-lld is used as the default linker on `x86_64-unknown-linux-gnu` on the nightly
|
||||
// channel, and that it can also be turned off with a CLI flag.
|
||||
// Ensure that rust-lld is used as the default linker on `x86_64-unknown-linux-gnu`
|
||||
// dist artifacts and that it can also be turned off with a CLI flag.
|
||||
|
||||
//@ needs-rust-lld
|
||||
//@ ignore-beta
|
||||
//@ ignore-stable
|
||||
//@ only-dist
|
||||
//@ only-x86_64-unknown-linux-gnu
|
||||
|
||||
use run_make_support::linker::{assert_rustc_doesnt_use_lld, assert_rustc_uses_lld};
|
||||
use run_make_support::rustc;
|
||||
|
||||
fn main() {
|
||||
// A regular compilation should use rust-lld by default. We'll check that by asking the linker
|
||||
// to display its version number with a link-arg.
|
||||
// A regular compilation should use rust-lld by default.
|
||||
assert_rustc_uses_lld(rustc().input("main.rs"));
|
||||
|
||||
// But it can still be disabled by turning the linker feature off.
|
||||
5
tests/run-make/rust-lld-x86_64-unknown-linux-gnu/main.rs
Normal file
5
tests/run-make/rust-lld-x86_64-unknown-linux-gnu/main.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Test linking using `cc` with `rust-lld`, which is on by default on the x86_64-unknown-linux-gnu
|
||||
// target.
|
||||
// See https://github.com/rust-lang/compiler-team/issues/510 for more info
|
||||
|
||||
fn main() {}
|
||||
20
tests/run-make/rust-lld-x86_64-unknown-linux-gnu/rmake.rs
Normal file
20
tests/run-make/rust-lld-x86_64-unknown-linux-gnu/rmake.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Ensure that rust-lld is used as the default linker on `x86_64-unknown-linux-gnu`
|
||||
// and that it can also be turned off with a CLI flag.
|
||||
//
|
||||
// This version of the test checks that LLD is used by default when LLD is enabled in the
|
||||
// toolchain. There is a separate test that checks that LLD is used for dist artifacts
|
||||
// unconditionally.
|
||||
|
||||
//@ needs-rust-lld
|
||||
//@ only-x86_64-unknown-linux-gnu
|
||||
|
||||
use run_make_support::linker::{assert_rustc_doesnt_use_lld, assert_rustc_uses_lld};
|
||||
use run_make_support::rustc;
|
||||
|
||||
fn main() {
|
||||
// A regular compilation should use rust-lld by default.
|
||||
assert_rustc_uses_lld(rustc().input("main.rs"));
|
||||
|
||||
// But it can still be disabled by turning the linker feature off.
|
||||
assert_rustc_doesnt_use_lld(rustc().arg("-Zlinker-features=-lld").input("main.rs"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue