Simplify some code in rustc_llvm/build.rs now that LLVM 8 is required

LLVM 8 is required since 8506bb0060
so this is safe to do.
This commit is contained in:
est31 2020-10-08 06:18:11 +02:00
parent 91a79fb29a
commit 8b8e706008

View File

@ -70,7 +70,7 @@ fn main() {
let host = env::var("HOST").expect("HOST was not set");
let is_crossed = target != host;
let mut optional_components = vec![
let optional_components = &[
"x86",
"arm",
"aarch64",
@ -85,6 +85,7 @@ fn main() {
"sparc",
"nvptx",
"hexagon",
"riscv",
];
let mut version_cmd = Command::new(&llvm_config);
@ -94,13 +95,9 @@ fn main() {
let (major, _minor) = if let (Some(major), Some(minor)) = (parts.next(), parts.next()) {
(major, minor)
} else {
(6, 0)
(8, 0)
};
if major > 6 {
optional_components.push("riscv");
}
let required_components = &[
"ipo",
"bitreader",