Skip to content

Commit 417fe47

Browse files
committed
Auto merge of rust-lang#80581 - jyn514:ci-llvm, r=Mark-Simulacrum
Give a better error for download-ci-llvm if .xz is not supported Previously: ``` curl: (22) The requested URL returned error: 404 failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmp6ptXJV https://ci-artifacts.rust-lang.org/rustc-builds/99ad5a1a2824fea1ecf60068fd3636beae7ea2da/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz ``` Now: ``` error: XZ support is required to download LLVM help: consider disabling `download-ci-llvm` or using a different version of python Build completed unsuccessfully in 0:00:00 ``` Follow-up to rust-lang#80435. r? `@Mark-Simulacrum`
2 parents 17eec14 + b5019d6 commit 417fe47

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/bootstrap.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,12 @@ def _download_ci_llvm(self, llvm_sha, llvm_assertions):
487487
url = "https://ci-artifacts.rust-lang.org/rustc-builds/{}".format(llvm_sha)
488488
if llvm_assertions:
489489
url = url.replace('rustc-builds', 'rustc-builds-alt')
490-
tarball_suffix = '.tar.xz' if support_xz() else '.tar.gz'
490+
# ci-artifacts are only stored as .xz, not .gz
491+
if not support_xz():
492+
print("error: XZ support is required to download LLVM")
493+
print("help: consider disabling `download-ci-llvm` or using python3")
494+
exit(1)
495+
tarball_suffix = '.tar.xz'
491496
filename = "rust-dev-nightly-" + self.build + tarball_suffix
492497
tarball = os.path.join(rustc_cache, filename)
493498
if not os.path.exists(tarball):

0 commit comments

Comments
 (0)