Skip to content

Commit

Permalink
Add all tier 1 platforms to supported platforms for "if-available"
Browse files Browse the repository at this point in the history
... and update the comment in `config.toml.example`
  • Loading branch information
jyn514 committed Jan 16, 2021
1 parent 6766070 commit 5c4adbe
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
8 changes: 5 additions & 3 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
15 changes: 14 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,21 @@ def download_stage0(self):

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:
Expand Down

0 comments on commit 5c4adbe

Please sign in to comment.