about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-02-27 08:03:54 -0800
committerAlex Crichton <alex@alexcrichton.com>2019-02-27 08:10:21 -0800
commit320640060f38957028141ea30bc4d5577d1e53b0 (patch)
tree0695c08c446efa07f0495fd6595f5217c09b203e /src/bootstrap
parentc196097e588b05e86b5ce6de992b2a6e6a7027bd (diff)
downloadrust-320640060f38957028141ea30bc4d5577d1e53b0.tar.gz
rust-320640060f38957028141ea30bc4d5577d1e53b0.zip
Whitelist containers that allow older toolchains
We'll use this as a temporary measure to get an LLVM update landed, but
we'll have to go through and update images later to make sure they've
got the right toolchains.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/config.rs3
-rw-r--r--src/bootstrap/native.rs4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 7d3e584f1a6..d20958854ed 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -78,6 +78,7 @@ pub struct Config {
     pub llvm_link_jobs: Option<u32>,
     pub llvm_version_suffix: Option<String>,
     pub llvm_use_linker: Option<String>,
+    pub llvm_allow_old_toolchain: Option<bool>,
 
     pub lld_enabled: bool,
     pub lldb_enabled: bool,
@@ -263,6 +264,7 @@ struct Llvm {
     ldflags: Option<String>,
     use_libcxx: Option<bool>,
     use_linker: Option<String>,
+    allow_old_toolchain: Option<bool>,
 }
 
 #[derive(Deserialize, Default, Clone)]
@@ -530,6 +532,7 @@ impl Config {
             config.llvm_ldflags = llvm.ldflags.clone();
             set(&mut config.llvm_use_libcxx, llvm.use_libcxx);
             config.llvm_use_linker = llvm.use_linker.clone();
+            config.llvm_allow_old_toolchain = llvm.allow_old_toolchain.clone();
         }
 
         if let Some(ref rust) = toml.rust {
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 192b1cd1fbb..d78670cfe51 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -238,6 +238,10 @@ impl Step for Llvm {
             cfg.define("LLVM_USE_LINKER", linker);
         }
 
+        if let Some(true) = builder.config.llvm_allow_old_toolchain {
+            cfg.define("LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN", "YES");
+        }
+
         if let Some(ref python) = builder.config.python {
             cfg.define("PYTHON_EXECUTABLE", python);
         }