Skip to content

Commit 3206400

Browse files
committed
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.
1 parent c196097 commit 3206400

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

config.toml.example

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
# The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
105105
#use-linker = "lld"
106106

107+
# Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
108+
#allow-old-toolchain = false
107109

108110
# =============================================================================
109111
# General build configuration options

src/bootstrap/config.rs

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pub struct Config {
7878
pub llvm_link_jobs: Option<u32>,
7979
pub llvm_version_suffix: Option<String>,
8080
pub llvm_use_linker: Option<String>,
81+
pub llvm_allow_old_toolchain: Option<bool>,
8182

8283
pub lld_enabled: bool,
8384
pub lldb_enabled: bool,
@@ -263,6 +264,7 @@ struct Llvm {
263264
ldflags: Option<String>,
264265
use_libcxx: Option<bool>,
265266
use_linker: Option<String>,
267+
allow_old_toolchain: Option<bool>,
266268
}
267269

268270
#[derive(Deserialize, Default, Clone)]
@@ -530,6 +532,7 @@ impl Config {
530532
config.llvm_ldflags = llvm.ldflags.clone();
531533
set(&mut config.llvm_use_libcxx, llvm.use_libcxx);
532534
config.llvm_use_linker = llvm.use_linker.clone();
535+
config.llvm_allow_old_toolchain = llvm.allow_old_toolchain.clone();
533536
}
534537

535538
if let Some(ref rust) = toml.rust {

src/bootstrap/native.rs

+4
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ impl Step for Llvm {
238238
cfg.define("LLVM_USE_LINKER", linker);
239239
}
240240

241+
if let Some(true) = builder.config.llvm_allow_old_toolchain {
242+
cfg.define("LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN", "YES");
243+
}
244+
241245
if let Some(ref python) = builder.config.python {
242246
cfg.define("PYTHON_EXECUTABLE", python);
243247
}

src/ci/docker/dist-x86_64-netbsd/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ ENV \
3333

3434
ENV HOSTS=x86_64-unknown-netbsd
3535

36-
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
36+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs \
37+
--set llvm.allow-old-toolchain
3738
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

0 commit comments

Comments
 (0)