Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove no-system-llvm #120265

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,9 +1109,6 @@ fn ignore_lldb(config: &Config, line: &str) -> IgnoreDecision {
}

fn ignore_llvm(config: &Config, line: &str) -> IgnoreDecision {
if config.system_llvm && line.starts_with("no-system-llvm") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can config.system_llvm be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's needed for min-system-llvm-version.

return IgnoreDecision::Ignore { reason: "ignored when the system LLVM is used".into() };
}
if let Some(needed_components) =
config.parse_name_value_directive(line, "needs-llvm-components")
{
Expand Down
21 changes: 12 additions & 9 deletions src/tools/compiletest/src/header/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,6 @@ fn aux_build() {
);
}

#[test]
fn no_system_llvm() {
let config: Config = cfg().system_llvm(false).build();
assert!(!check_ignore(&config, "// no-system-llvm"));

let config: Config = cfg().system_llvm(true).build();
assert!(check_ignore(&config, "// no-system-llvm"));
}

#[test]
fn llvm_version() {
let config: Config = cfg().llvm_version("8.1.2").build();
Expand All @@ -266,6 +257,18 @@ fn llvm_version() {
assert!(!check_ignore(&config, "// min-llvm-version: 9.0"));
}

#[test]
fn system_llvm_version() {
let config: Config = cfg().system_llvm(true).llvm_version("17.0.0").build();
assert!(check_ignore(&config, "// min-system-llvm-version: 18.0"));

let config: Config = cfg().system_llvm(true).llvm_version("18.0.0").build();
assert!(!check_ignore(&config, "// min-system-llvm-version: 18.0"));

let config: Config = cfg().llvm_version("17.0.0").build();
assert!(!check_ignore(&config, "// min-system-llvm-version: 18.0"));
}

#[test]
fn ignore_target() {
let config: Config = cfg().target("x86_64-unknown-linux-gnu").build();
Expand Down
2 changes: 0 additions & 2 deletions tests/codegen/alloc-optimisation.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//
// no-system-llvm
// compile-flags: -O
#![crate_type = "lib"]

Expand Down
3 changes: 1 addition & 2 deletions tests/codegen/array-map.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C opt-level=3 -C target-cpu=x86-64-v3
// no-system-llvm
// only-x86_64
// ignore-debug (the extra assertions get in the way)

Expand All @@ -10,7 +9,7 @@
pub fn short_integer_map(x: [u32; 8]) -> [u32; 8] {
// CHECK: load <8 x i32>
// CHECK: shl <8 x i32>
// CHECK: or <8 x i32>
// CHECK: or{{( disjoint)?}} <8 x i32>
// CHECK: store <8 x i32>
x.map(|x| 2 * x + 1)
}
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/dealloc-no-unwind.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -O

#![crate_type="lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/fewer-names.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -Coverflow-checks=no -O
// revisions: YES NO
// [YES]compile-flags: -Zfewer-names=yes
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/integer-overflow.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -O -C overflow-checks=on

#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/issues/issue-116878.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -O
// ignore-debug: the debug assertions get in the way
#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/issues/issue-44056-macos-tls-align.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//
// only-macos
// no-system-llvm
// compile-flags: -O

#![crate_type = "rlib"]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/issues/issue-69101-bounds-check.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -O
// ignore-debug: the debug assertions get in the way
#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/match-optimizes-away.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//
// no-system-llvm
// compile-flags: -O
#![crate_type="lib"]

Expand Down
1 change: 0 additions & 1 deletion tests/codegen/ptr-read-metadata.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -O -Z merge-functions=disabled
// no-system-llvm
// ignore-debug (the extra assertions get in the way)

#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/slice-as_chunks.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -O
// only-64bit (because the LLVM type of i64 for usize shows up)
// ignore-debug: the debug assertions get in the way
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/slice-iter-len-eq-zero.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -O
// ignore-debug: the debug assertions add extra comparisons
#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/slice-iter-nonnull.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -O
// ignore-debug (these add extra checks that make it hard to verify)
#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/slice-position-bounds-check.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -O -C panic=abort
#![crate_type = "lib"]

Expand Down
1 change: 0 additions & 1 deletion tests/codegen/vec-iter-collect-len.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ignore-debug: the debug assertions get in the way
// no-system-llvm
// compile-flags: -O
#![crate_type="lib"]

Expand Down
1 change: 0 additions & 1 deletion tests/codegen/vec-optimizes-away.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ignore-debug: the debug assertions get in the way
// no-system-llvm
// compile-flags: -O
#![crate_type = "lib"]

Expand Down
1 change: 0 additions & 1 deletion tests/rustdoc/doc-cfg-target-feature.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// only-x86_64
// compile-flags:--test
// should-fail
// no-system-llvm

// #49723: rustdoc didn't add target features when extracting or running doctests

Expand Down
1 change: 0 additions & 1 deletion tests/ui/for-loop-while/issue-69841.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// LLVM bug which needed a fix to be backported.

// run-pass
// no-system-llvm

fn main() {
let buffer = [49u8, 10];
Expand Down
1 change: 0 additions & 1 deletion tests/ui/issue-76387-llvm-miscompile.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no-system-llvm
// compile-flags: -C opt-level=3
// aux-build: issue-76387.rs
// run-pass
Expand Down
Loading