summary refs log tree commit diff
path: root/compiler/rustc_llvm/build.rs
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2020-10-08 06:18:11 +0200
committerest31 <MTest31@outlook.com>2020-10-08 06:19:06 +0200
commit8b8e706008111fa3865e8da76eeddabfbf9851f0 (patch)
tree0bdee6f3f661fa9fa92c028a274fe25604738205 /compiler/rustc_llvm/build.rs
parent91a79fb29ac78d057d04dbe86be13d5dcc64309a (diff)
downloadrust-8b8e706008111fa3865e8da76eeddabfbf9851f0.tar.gz
rust-8b8e706008111fa3865e8da76eeddabfbf9851f0.zip
Simplify some code in rustc_llvm/build.rs now that LLVM 8 is required
LLVM 8 is required since 8506bb006040cf8e8cb004202706c81e62ddacee
so this is safe to do.
Diffstat (limited to 'compiler/rustc_llvm/build.rs')
-rw-r--r--compiler/rustc_llvm/build.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
index 7f1e5cf336a..54b22ca49a2 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -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",