Skip to content

Commit 168ec24

Browse files
committed
Upgrade the version of Clang used in the build, move MSVC builds to Server 2022
1 parent cc8d9b6 commit 168ec24

File tree

4 files changed

+39
-31
lines changed

4 files changed

+39
-31
lines changed

src/bootstrap/src/core/builder.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -2549,7 +2549,12 @@ impl Cargo {
25492549
// FIXME: the guard against msvc shouldn't need to be here
25502550
if target.is_msvc() {
25512551
if let Some(ref cl) = builder.config.llvm_clang_cl {
2552-
self.command.env("CC", cl).env("CXX", cl);
2552+
// FIXME: There is a bug in Clang 18 when building for ARM64:
2553+
// https://github.com/llvm/llvm-project/pull/81849. This is
2554+
// fixed in LLVM 19, but can't be backported.
2555+
if !target.starts_with("aarch64") && !target.starts_with("arm64ec") {
2556+
self.command.env("CC", cl).env("CXX", cl);
2557+
}
25532558
}
25542559
} else {
25552560
let ccache = builder.config.ccache.as_ref();

src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -ex
44

55
source shared.sh
66

7+
# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh
78
LLVM=llvmorg-18.1.0
89

910
mkdir llvm-project

src/ci/github-actions/jobs.yml

+21-25
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ runners:
3232
os: windows-2022-16core-64gb
3333
<<: *base-job
3434

35-
- &job-windows-2019-8c
36-
os: windows-2019-8core-32gb
37-
<<: *base-job
38-
39-
- &job-windows-2019-16c
40-
os: windows-2019-16core-64gb
41-
<<: *base-job
42-
4335
- &job-aarch64-linux
4436
os: [ self-hosted, ARM64, linux ]
4537

@@ -83,17 +75,21 @@ envs:
8375
# These jobs automatically inherit envs.pr, to avoid repeating
8476
# it in each job definition.
8577
pr:
86-
- image: mingw-check
87-
<<: *job-linux-4c
88-
- image: mingw-check-tidy
89-
continue_on_error: true
90-
<<: *job-linux-4c
91-
- image: x86_64-gnu-llvm-17
78+
- image: dist-aarch64-msvc
9279
env:
93-
ENABLE_GCC_CODEGEN: "1"
94-
<<: *job-linux-16c
95-
- image: x86_64-gnu-tools
96-
<<: *job-linux-16c
80+
RUST_CONFIGURE_ARGS: >-
81+
--build=x86_64-pc-windows-msvc
82+
--host=aarch64-pc-windows-msvc
83+
--enable-full-tools
84+
--enable-profiler
85+
SCRIPT: python x.py dist bootstrap --include-default-paths
86+
DIST_REQUIRE_ALL_TOOLS: 1
87+
<<: *job-windows-8c
88+
- image: x86_64-msvc
89+
env:
90+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
91+
SCRIPT: make ci-msvc
92+
<<: *job-windows-8c
9793

9894
# Jobs that run when you perform a try build (@bors try)
9995
# These jobs automatically inherit envs.try, to avoid repeating
@@ -349,21 +345,21 @@ auto:
349345
env:
350346
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
351347
SCRIPT: make ci-msvc
352-
<<: *job-windows-2019-8c
348+
<<: *job-windows-8c
353349

354350
- image: i686-msvc
355351
env:
356352
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
357353
SCRIPT: make ci-msvc
358-
<<: *job-windows-2019-8c
354+
<<: *job-windows-8c
359355

360356
- image: x86_64-msvc-ext
361357
env:
362358
SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo && src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
363359
HOST_TARGET: x86_64-pc-windows-msvc
364360
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld --save-toolstates=/tmp/toolstate/toolstates.json
365361
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
366-
<<: *job-windows-2019-8c
362+
<<: *job-windows-8c
367363

368364
# 32/64-bit MinGW builds.
369365
#
@@ -414,7 +410,7 @@ auto:
414410
--set rust.codegen-units=1
415411
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
416412
DIST_REQUIRE_ALL_TOOLS: 1
417-
<<: *job-windows-2019-8c
413+
<<: *job-windows-8c
418414

419415
- image: dist-i686-msvc
420416
env:
@@ -426,7 +422,7 @@ auto:
426422
--enable-profiler
427423
SCRIPT: python x.py dist bootstrap --include-default-paths
428424
DIST_REQUIRE_ALL_TOOLS: 1
429-
<<: *job-windows-2019-8c
425+
<<: *job-windows-8c
430426

431427
- image: dist-aarch64-msvc
432428
env:
@@ -437,7 +433,7 @@ auto:
437433
--enable-profiler
438434
SCRIPT: python x.py dist bootstrap --include-default-paths
439435
DIST_REQUIRE_ALL_TOOLS: 1
440-
<<: *job-windows-2019-8c
436+
<<: *job-windows-8c
441437

442438
- image: dist-i686-mingw
443439
env:
@@ -471,4 +467,4 @@ auto:
471467
env:
472468
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler
473469
SCRIPT: python x.py dist bootstrap --include-default-paths
474-
<<: *job-windows-2019-8c
470+
<<: *job-windows-8c

src/ci/scripts/install-clang.sh

+11-5
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,24 @@ IFS=$'\n\t'
1010
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
1111

1212
# Update both macOS's and Windows's tarballs when bumping the version here.
13-
LLVM_VERSION="14.0.5"
13+
# Try to keep this in sync with src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh
14+
LLVM_VERSION="18.1.4"
1415

1516
if isMacOS; then
17+
# FIXME: This is the latest pre-built version of LLVM that's available for
18+
# x86_64 MacOS. We may want to consider bulding our own LLVM binaries
19+
# instead, or set `USE_XCODE_CLANG` like AArch64 does.
20+
LLVM_VERSION="15.0.7"
21+
1622
# If the job selects a specific Xcode version, use that instead of
1723
# downloading our own version.
1824
if [[ ${USE_XCODE_CLANG-0} -eq 1 ]]; then
1925
bindir="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/bin"
2026
else
21-
file="${MIRRORS_BASE}/clang%2Bllvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz"
22-
retry curl -f "${file}" -o "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz"
23-
tar xJf "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz"
24-
bindir="$(pwd)/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin/bin"
27+
file="${MIRRORS_BASE}/clang%2Bllvm-${LLVM_VERSION}-x86_64-apple-darwin21.0.tar.xz"
28+
retry curl -f "${file}" -o "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0.tar.xz"
29+
tar xJf "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0.tar.xz"
30+
bindir="$(pwd)/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0/bin"
2531
fi
2632

2733
ciCommandSetEnv CC "${bindir}/clang"

0 commit comments

Comments
 (0)