Skip to content

Commit

Permalink
Auto merge of #77690 - est31:llvm_8_required, r=matthewjasper
Browse files Browse the repository at this point in the history
Simplify some code in rustc_llvm/build.rs now that LLVM 8 is required

LLVM 8 is required since 8506bb0
so this is safe to do.
  • Loading branch information
bors committed Oct 9, 2020
2 parents 6b8b396 + 8b8e706 commit 53a4c3b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions compiler/rustc_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -85,6 +85,7 @@ fn main() {
"sparc",
"nvptx",
"hexagon",
"riscv",
];

let mut version_cmd = Command::new(&llvm_config);
Expand All @@ -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",
Expand Down

0 comments on commit 53a4c3b

Please sign in to comment.