Skip to content

Commit e7f4b8b

Browse files
committed
Auto merge of rust-lang#86092 - JohnTitor:clang-12-beta, r=Mark-Simulacrum
[beta] Backport rust-lang#84894 to fix beta CI Currently, beta backports fail with this failure: rust-lang#86036 (comment) ``` STL1000: Unexpected compiler version, expected Clang 11.0.0 or newer. ``` The previous beta backport was successful because it uses a Visual Studio tool v14.28.29910 but now CI uses v14.29.30037. rust-lang#84894 updated clang to 12 so master didn't catch this change, I guess. Hopefully, it fixes CI failures on beta.
2 parents 82b8621 + ff4c377 commit e7f4b8b

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

src/ci/scripts/install-clang.sh

+7-16
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ IFS=$'\n\t'
99
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
1010

1111
# Update both macOS's and Windows's tarballs when bumping the version here.
12-
LLVM_VERSION="10.0.0"
12+
LLVM_VERSION="12.0.0"
1313

1414
if isMacOS; then
1515
# If the job selects a specific Xcode version, use that instead of
@@ -42,23 +42,14 @@ elif isWindows && [[ ${CUSTOM_MINGW-0} -ne 1 ]]; then
4242
# clang has an output mode compatible with MinGW that we need. If it does we
4343
# should switch to clang for MinGW as well!
4444
#
45-
# Note that the LLVM installer is an NSIS installer
46-
#
47-
# Original downloaded here came from:
48-
#
49-
# https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe
50-
#
51-
# That installer was run through `wine ./installer.exe /S /NCRC` on Linux
52-
# and then the resulting installation directory (found in
53-
# `$HOME/.wine/drive_c/Program Files/LLVM`) was packaged up into a tarball.
54-
# We've had issues otherwise that the installer will randomly hang, provide
55-
# not a lot of useful information, pollute global state, etc. In general the
56-
# tarball is just more confined and easier to deal with when working with
57-
# various CI environments.
45+
# The LLVM installer is an NSIS installer, which we can extract with 7z. We
46+
# don't want to run the installer directly; extracting it is more reliable
47+
# in CI environments.
5848

59-
mkdir -p citools
49+
mkdir -p citools/clang-rust
6050
cd citools
61-
curl -f "${MIRRORS_BASE}/LLVM-${LLVM_VERSION}-win64.tar.gz" | tar xzf -
51+
curl -f "${MIRRORS_BASE}/LLVM-${LLVM_VERSION}-win64.exe" -o "LLVM-${LLVM_VERSION}-win64.exe"
52+
7z x -oclang-rust/ "LLVM-${LLVM_VERSION}-win64.exe"
6253
ciCommandSetEnv RUST_CONFIGURE_ARGS \
6354
"${RUST_CONFIGURE_ARGS} --set llvm.clang-cl=$(pwd)/clang-rust/bin/clang-cl.exe"
6455
fi

0 commit comments

Comments
 (0)