Skip to content

Commit 5c4adbe

Browse files
committed
Add all tier 1 platforms to supported platforms for "if-available"
... and update the comment in `config.toml.example`
1 parent 6766070 commit 5c4adbe

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

config.toml.example

+5-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ changelog-seen = 2
3535
# Unless you're developing for a target where Rust CI doesn't build a compiler
3636
# toolchain or changing LLVM locally, you probably want to set this to true.
3737
#
38-
# It's currently false by default due to being newly added; please file bugs if
39-
# enabling this did not work for you on x86_64-unknown-linux-gnu.
40-
# Other target triples are currently not supported; see #77084.
38+
# This is false by default so that distributions don't unexpectedly download
39+
# LLVM from the internet.
40+
#
41+
# All tier 1 targets are currently supported; set this to `"if-supported"` if
42+
# you are not sure whether you're on a tier 1 target.
4143
#
4244
# We also currently only support this when building LLVM for the build triple.
4345
#

src/bootstrap/bootstrap.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,21 @@ def download_stage0(self):
465465

466466
def downloading_llvm(self):
467467
opt = self.get_toml('download-ci-llvm', 'llvm')
468+
# This is currently all tier 1 targets (since others may not have CI
469+
# artifacts)
470+
# https://doc.rust-lang.org/rustc/platform-support.html#tier-1
471+
supported_platforms = [
472+
"aarch64-unknown-linux-gnu",
473+
"i686-pc-windows-gnu",
474+
"i686-pc-windows-msvc",
475+
"i686-unknown-linux-gnu",
476+
"x86_64-unknown-linux-gnu",
477+
"x86_64-apple-darwin",
478+
"x86_64-pc-windows-gnu",
479+
"x86_64-pc-windows-msvc",
480+
]
468481
return opt == "true" \
469-
or (opt == "if-available" and self.build == "x86_64-unknown-linux-gnu")
482+
or (opt == "if-available" and self.build in supported_platforms)
470483

471484
def _download_stage0_helper(self, filename, pattern, tarball_suffix, date=None):
472485
if date is None:

0 commit comments

Comments
 (0)