Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c8f1531

Browse files
authored
Rollup merge of rust-lang#120265 - nikic:no-no-system-llvm, r=nagisa
Remove no-system-llvm We currently have a bunch of codegen tests that use no-system-llvm -- however, all of those tests also pass with system LLVM 16. I've opted to remove `no-system-llvm` entirely, as there's basically no valid use case for it anymore: * The only thing this option could have legitimately been used for (testing the target feature support that requires an LLVM patch) doesn't use it, and the need for this will go away with LLVM 18 anyway. * In cases where the test depends on optimizations/fixes from newer LLVM versions, `min-llvm-version` should be used instead. * In case it depends on optimization/fixes from newer LLVM versions that have been backported into our fork, `min-system-llvm-version` (with the major version larger than the one in our fork) should be used instead. r? ````@cuviper````
2 parents 662b7b6 + f4f589a commit c8f1531

21 files changed

+13
-33
lines changed

src/tools/compiletest/src/header.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,9 +1109,6 @@ fn ignore_lldb(config: &Config, line: &str) -> IgnoreDecision {
11091109
}
11101110

11111111
fn ignore_llvm(config: &Config, line: &str) -> IgnoreDecision {
1112-
if config.system_llvm && line.starts_with("no-system-llvm") {
1113-
return IgnoreDecision::Ignore { reason: "ignored when the system LLVM is used".into() };
1114-
}
11151112
if let Some(needed_components) =
11161113
config.parse_name_value_directive(line, "needs-llvm-components")
11171114
{

src/tools/compiletest/src/header/tests.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,6 @@ fn aux_build() {
242242
);
243243
}
244244

245-
#[test]
246-
fn no_system_llvm() {
247-
let config: Config = cfg().system_llvm(false).build();
248-
assert!(!check_ignore(&config, "// no-system-llvm"));
249-
250-
let config: Config = cfg().system_llvm(true).build();
251-
assert!(check_ignore(&config, "// no-system-llvm"));
252-
}
253-
254245
#[test]
255246
fn llvm_version() {
256247
let config: Config = cfg().llvm_version("8.1.2").build();
@@ -266,6 +257,18 @@ fn llvm_version() {
266257
assert!(!check_ignore(&config, "// min-llvm-version: 9.0"));
267258
}
268259

260+
#[test]
261+
fn system_llvm_version() {
262+
let config: Config = cfg().system_llvm(true).llvm_version("17.0.0").build();
263+
assert!(check_ignore(&config, "// min-system-llvm-version: 18.0"));
264+
265+
let config: Config = cfg().system_llvm(true).llvm_version("18.0.0").build();
266+
assert!(!check_ignore(&config, "// min-system-llvm-version: 18.0"));
267+
268+
let config: Config = cfg().llvm_version("17.0.0").build();
269+
assert!(!check_ignore(&config, "// min-system-llvm-version: 18.0"));
270+
}
271+
269272
#[test]
270273
fn ignore_target() {
271274
let config: Config = cfg().target("x86_64-unknown-linux-gnu").build();

tests/codegen/alloc-optimisation.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//
2-
// no-system-llvm
31
// compile-flags: -O
42
#![crate_type = "lib"]
53

tests/codegen/array-map.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// compile-flags: -C opt-level=3 -C target-cpu=x86-64-v3
2-
// no-system-llvm
32
// only-x86_64
43
// ignore-debug (the extra assertions get in the way)
54

@@ -10,7 +9,7 @@
109
pub fn short_integer_map(x: [u32; 8]) -> [u32; 8] {
1110
// CHECK: load <8 x i32>
1211
// CHECK: shl <8 x i32>
13-
// CHECK: or <8 x i32>
12+
// CHECK: or{{( disjoint)?}} <8 x i32>
1413
// CHECK: store <8 x i32>
1514
x.map(|x| 2 * x + 1)
1615
}

tests/codegen/dealloc-no-unwind.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// no-system-llvm
21
// compile-flags: -O
32

43
#![crate_type="lib"]

tests/codegen/fewer-names.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// no-system-llvm
21
// compile-flags: -Coverflow-checks=no -O
32
// revisions: YES NO
43
// [YES]compile-flags: -Zfewer-names=yes

tests/codegen/integer-overflow.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// no-system-llvm
21
// compile-flags: -O -C overflow-checks=on
32

43
#![crate_type = "lib"]

tests/codegen/issues/issue-116878.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// no-system-llvm
21
// compile-flags: -O
32
// ignore-debug: the debug assertions get in the way
43
#![crate_type = "lib"]

tests/codegen/issues/issue-44056-macos-tls-align.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//
22
// only-macos
3-
// no-system-llvm
43
// compile-flags: -O
54

65
#![crate_type = "rlib"]

tests/codegen/issues/issue-69101-bounds-check.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// no-system-llvm
21
// compile-flags: -O
32
// ignore-debug: the debug assertions get in the way
43
#![crate_type = "lib"]

0 commit comments

Comments
 (0)