Skip to content

Commit f4f589a

Browse files
committed
Remove support for no-system-llvm
Also add tests for min-system-llvm-version.
1 parent 31f5f03 commit f4f589a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/tools/compiletest/src/header.rs

-3
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

+12-9
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();

0 commit comments

Comments
 (0)