]> git.lizzy.rs Git - rust.git/commitdiff
Whitelist containers that allow older toolchains
authorAlex Crichton <alex@alexcrichton.com>
Wed, 27 Feb 2019 16:03:54 +0000 (08:03 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 27 Feb 2019 16:10:21 +0000 (08:10 -0800)
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.

config.toml.example
src/bootstrap/config.rs
src/bootstrap/native.rs
src/ci/docker/dist-x86_64-netbsd/Dockerfile

index f45db37c33b86103d1e35929600ebc5167c7e009..8f6bf03489f06eb7ee36bee4b2445d3bde04f202 100644 (file)
 # The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
 #use-linker = "lld"
 
+# Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
+#allow-old-toolchain = false
 
 # =============================================================================
 # General build configuration options
index 7d3e584f1a6fa4f649cc6f3b8e506908a44c7838..d20958854ed6a132a14a6daa18ded263d3440afd 100644 (file)
@@ -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 @@ pub fn parse(args: &[String]) -> 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 {
index 192b1cd1fbb756bd68b726c56132f2363d73d149..d78670cfe515af762c32a009294ca0b04fb461ed 100644 (file)
@@ -238,6 +238,10 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
             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);
         }
index a17a7ebc03dd165f92b588d2bf802d3b5d7ec754..4fe7e2cca2b6009577b7a51179d2ed9e8168e400 100644 (file)
@@ -33,5 +33,6 @@ ENV \
 
 ENV HOSTS=x86_64-unknown-netbsd
 
-ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
+ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs \
+  --set llvm.allow-old-toolchain
 ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS