diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-07-30 17:11:50 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-08-19 09:04:47 -0400 |
| commit | 8ca14aa7ff9d0c4adde9c9058acbb2edf59bb05f (patch) | |
| tree | cbb84233641f58d133195c05cd877241ad96a08e /src/bootstrap/config.rs | |
| parent | 2769d6b9cc08038c2fe4ac657a7991a720f6f3c0 (diff) | |
| download | rust-8ca14aa7ff9d0c4adde9c9058acbb2edf59bb05f.tar.gz rust-8ca14aa7ff9d0c4adde9c9058acbb2edf59bb05f.zip | |
Refactor if-available setting to work in CI
This verifies if the HEAD sha matches with the detected LLVM SHA, and if not, permits usage of the detected LLVM. Otherwise, we fallback on regular non-downloaded LLVM (currently still cached with sccache, though that's still 10+ minutes on macOS).
Diffstat (limited to 'src/bootstrap/config.rs')
| -rw-r--r-- | src/bootstrap/config.rs | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index dc0fd2bdc65..56a0c1b2d91 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -990,41 +990,7 @@ impl Config { config.llvm_from_ci = match llvm.download_ci_llvm { Some(StringOrBool::String(s)) => { assert!(s == "if-available", "unknown option `{}` for download-ci-llvm", s); - // This is currently all tier 1 targets and tier 2 targets with host tools - // (since others may not have CI artifacts) - // https://doc.rust-lang.org/rustc/platform-support.html#tier-1 - let supported_platforms = [ - // tier 1 - "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", - // tier 2 with host tools - "aarch64-apple-darwin", - "aarch64-pc-windows-msvc", - "aarch64-unknown-linux-musl", - "arm-unknown-linux-gnueabi", - "arm-unknown-linux-gnueabihf", - "armv7-unknown-linux-gnueabihf", - "mips-unknown-linux-gnu", - "mips64-unknown-linux-gnuabi64", - "mips64el-unknown-linux-gnuabi64", - "mipsel-unknown-linux-gnu", - "powerpc-unknown-linux-gnu", - "powerpc64-unknown-linux-gnu", - "powerpc64le-unknown-linux-gnu", - "riscv64gc-unknown-linux-gnu", - "s390x-unknown-linux-gnu", - "x86_64-unknown-freebsd", - "x86_64-unknown-illumos", - "x86_64-unknown-linux-musl", - "x86_64-unknown-netbsd", - ]; - supported_platforms.contains(&&*config.build.triple) + crate::native::is_ci_llvm_available(&config) } Some(StringOrBool::Bool(b)) => b, None => false, |
