Skip to content

Commit 1a64320

Browse files
committed
adjust tests to leave lld in beta
- stable tests to ensure lld is not used - splitting beta (where lld is on) behavior from stable (where it is off)
1 parent 085bdc2 commit 1a64320

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fn main() {}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Ensure that rust-lld is *not* used as the default linker on `x86_64-unknown-linux-gnu` on stable.
2+
3+
//@ only-stable
4+
//@ only-x86_64-unknown-linux-gnu
5+
6+
use run_make_support::linker::assert_rustc_doesnt_use_lld;
7+
use run_make_support::rustc;
8+
9+
fn main() {
10+
// A regular compilation should not use rust-lld by default. We'll check that by asking the
11+
// linker to display its version number with a link-arg.
12+
assert_rustc_doesnt_use_lld(rustc().input("main.rs"));
13+
}

tests/run-make/rust-lld-x86_64-unknown-linux-gnu-dist/rmake.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
// Ensure that rust-lld is used as the default linker on `x86_64-unknown-linux-gnu`
2-
// dist artifacts and that it can also be turned off with a CLI flag.
1+
// Ensure that rust-lld is used as the default linker on `x86_64-unknown-linux-gnu` dist artifacts
2+
// (except on stable) and that it can also be turned off with a CLI flag.
33

44
//@ only-dist
5+
//@ ignore-stable
56
//@ only-x86_64-unknown-linux-gnu
67

78
use run_make_support::linker::{assert_rustc_doesnt_use_lld, assert_rustc_uses_lld};

tests/run-make/rust-lld-x86_64-unknown-linux-gnu/rmake.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// Ensure that rust-lld is used as the default linker on `x86_64-unknown-linux-gnu`
2-
// and that it can also be turned off with a CLI flag.
1+
// Ensure that rust-lld is used as the default linker on `x86_64-unknown-linux-gnu` (except on
2+
// stable) and that it can also be turned off with a CLI flag.
33
//
44
// This version of the test checks that LLD is used by default when LLD is enabled in the
55
// toolchain. There is a separate test that checks that LLD is used for dist artifacts
66
// unconditionally.
77

88
//@ needs-rust-lld
9+
//@ ignore-stable
910
//@ only-x86_64-unknown-linux-gnu
1011

1112
use run_make_support::linker::{assert_rustc_doesnt_use_lld, assert_rustc_uses_lld};

0 commit comments

Comments
 (0)