Add all tier 1 platforms to supported platforms for "if-available"

... and update the comment in `config.toml.example`
This commit is contained in:
Joshua Nelson 2021-01-13 09:32:48 -05:00
parent 6766070422
commit 5c4adbe1e1
2 changed files with 19 additions and 4 deletions

View File

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

View File

@ -465,8 +465,21 @@ class RustBuild(object):
def downloading_llvm(self):
opt = self.get_toml('download-ci-llvm', 'llvm')
# This is currently all tier 1 targets (since others may not have CI
# artifacts)
# https://doc.rust-lang.org/rustc/platform-support.html#tier-1
supported_platforms = [
"aarch64-unknown-linux-gnu",
"i686-pc-windows-gnu",
"i686-pc-windows-msvc",
"i686-unknown-linux-gnu",
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-gnu",
"x86_64-pc-windows-msvc",
]
return opt == "true" \
or (opt == "if-available" and self.build == "x86_64-unknown-linux-gnu")
or (opt == "if-available" and self.build in supported_platforms)
def _download_stage0_helper(self, filename, pattern, tarball_suffix, date=None):
if date is None: