Allow minimum system LLVM version in tests
This adds a "min-system-llvm-version" directive, so that a test can indicate that it will either work with rust-llvm or with some minimal system LLVM. This makes it simpler to write a test that requires an LLVM patch that landed upstream and was then backported to rust-llvm.
This commit is contained in:
parent
f93a4928c2
commit
a512228141
@ -150,6 +150,14 @@ impl EarlyProps {
|
|||||||
// Ignore if actual version is smaller the minimum required
|
// Ignore if actual version is smaller the minimum required
|
||||||
// version
|
// version
|
||||||
&actual_version[..] < min_version
|
&actual_version[..] < min_version
|
||||||
|
} else if line.starts_with("min-system-llvm-version") {
|
||||||
|
let min_version = line.trim_right()
|
||||||
|
.rsplit(' ')
|
||||||
|
.next()
|
||||||
|
.expect("Malformed llvm version directive");
|
||||||
|
// Ignore if using system LLVM and actual version
|
||||||
|
// is smaller the minimum required version
|
||||||
|
!(config.system_llvm && &actual_version[..] < min_version)
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user