Skip to content

Commit eb69090

Browse files
authored
Rollup merge of #89888 - rusticstuff:download-ci-llvm-apple-arm64, r=Mark-Simulacrum
Make `llvm.download-ci-llvm="if-available"` work for tier 2 targets with host tools `llvm.download-ci-llvm="if-available"` is used for most profiles configured via `x.py setup`. It allows downloading prebuilt LLVM tarballs from the CI artifacts for a configured list of platforms. Currently this list is restricted to tier 1 targets but it makes sense for all tier 2 targets with host tools.
2 parents 59dc218 + ac298c9 commit eb69090

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

src/bootstrap/bootstrap.py

+23-2
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,11 @@ def download_toolchain(self, stage0=True, rustc_channel=None):
492492

493493
def downloading_llvm(self):
494494
opt = self.get_toml('download-ci-llvm', 'llvm')
495-
# This is currently all tier 1 targets (since others may not have CI
496-
# artifacts)
495+
# This is currently all tier 1 targets and tier 2 targets with host tools
496+
# (since others may not have CI artifacts)
497497
# https://doc.rust-lang.org/rustc/platform-support.html#tier-1
498498
supported_platforms = [
499+
# tier 1
499500
"aarch64-unknown-linux-gnu",
500501
"i686-pc-windows-gnu",
501502
"i686-pc-windows-msvc",
@@ -504,6 +505,26 @@ def downloading_llvm(self):
504505
"x86_64-apple-darwin",
505506
"x86_64-pc-windows-gnu",
506507
"x86_64-pc-windows-msvc",
508+
# tier 2 with host tools
509+
"aarch64-apple-darwin",
510+
"aarch64-pc-windows-msvc",
511+
"aarch64-unknown-linux-musl",
512+
"arm-unknown-linux-gnueabi",
513+
"arm-unknown-linux-gnueabihf",
514+
"armv7-unknown-linux-gnueabihf",
515+
"mips-unknown-linux-gnu",
516+
"mips64-unknown-linux-gnuabi64",
517+
"mips64el-unknown-linux-gnuabi64",
518+
"mipsel-unknown-linux-gnu",
519+
"powerpc-unknown-linux-gnu",
520+
"powerpc64-unknown-linux-gnu",
521+
"powerpc64le-unknown-linux-gnu",
522+
"riscv64gc-unknown-linux-gnu",
523+
"s390x-unknown-linux-gnu",
524+
"x86_64-unknown-freebsd",
525+
"x86_64-unknown-illumos",
526+
"x86_64-unknown-linux-musl",
527+
"x86_64-unknown-netbsd",
507528
]
508529
return opt == "true" \
509530
or (opt == "if-available" and self.build in supported_platforms)

src/bootstrap/config.rs

+23-1
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,12 @@ impl Config {
765765
config.llvm_from_ci = match llvm.download_ci_llvm {
766766
Some(StringOrBool::String(s)) => {
767767
assert!(s == "if-available", "unknown option `{}` for download-ci-llvm", s);
768-
// This is currently all tier 1 targets (since others may not have CI artifacts)
768+
// This is currently all tier 1 targets and tier 2 targets with host tools
769+
// (since others may not have CI artifacts)
769770
// https://doc.rust-lang.org/rustc/platform-support.html#tier-1
770771
// FIXME: this is duplicated in bootstrap.py
771772
let supported_platforms = [
773+
// tier 1
772774
"aarch64-unknown-linux-gnu",
773775
"i686-pc-windows-gnu",
774776
"i686-pc-windows-msvc",
@@ -777,6 +779,26 @@ impl Config {
777779
"x86_64-apple-darwin",
778780
"x86_64-pc-windows-gnu",
779781
"x86_64-pc-windows-msvc",
782+
// tier 2 with host tools
783+
"aarch64-apple-darwin",
784+
"aarch64-pc-windows-msvc",
785+
"aarch64-unknown-linux-musl",
786+
"arm-unknown-linux-gnueabi",
787+
"arm-unknown-linux-gnueabihf",
788+
"armv7-unknown-linux-gnueabihf",
789+
"mips-unknown-linux-gnu",
790+
"mips64-unknown-linux-gnuabi64",
791+
"mips64el-unknown-linux-gnuabi64",
792+
"mipsel-unknown-linux-gnu",
793+
"powerpc-unknown-linux-gnu",
794+
"powerpc64-unknown-linux-gnu",
795+
"powerpc64le-unknown-linux-gnu",
796+
"riscv64gc-unknown-linux-gnu",
797+
"s390x-unknown-linux-gnu",
798+
"x86_64-unknown-freebsd",
799+
"x86_64-unknown-illumos",
800+
"x86_64-unknown-linux-musl",
801+
"x86_64-unknown-netbsd",
780802
];
781803
supported_platforms.contains(&&*config.build.triple)
782804
}

0 commit comments

Comments
 (0)