Skip to content

Commit 3d9bf08

Browse files
authored
Merge pull request rust-lang#2283 from jieyouxu/sync
Rustc pull
2 parents a863f2c + 7bde176 commit 3d9bf08

File tree

6,081 files changed

+86688
-52134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,081 files changed

+86688
-52134
lines changed

.github/workflows/ci.yml

+24-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file defines our primary CI workflow that runs on pull requests
22
# and also on pushes to special branches (auto, try).
33
#
4-
# The actual definition of the executed jobs is calculated by a Python
5-
# script located at src/ci/github-actions/ci.py, which
4+
# The actual definition of the executed jobs is calculated by the
5+
# `src/ci/citool` crate, which
66
# uses job definition data from src/ci/github-actions/jobs.yml.
77
# You should primarily modify the `jobs.yml` file if you want to modify
88
# what jobs are executed in CI.
@@ -56,7 +56,10 @@ jobs:
5656
- name: Calculate the CI job matrix
5757
env:
5858
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
59-
run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
59+
run: |
60+
cd src/ci/citool
61+
CARGO_INCREMENTAL=0 cargo test
62+
CARGO_INCREMENTAL=0 cargo run calculate-job-matrix >> $GITHUB_OUTPUT
6063
id: jobs
6164
job:
6265
name: ${{ matrix.full_name }}
@@ -179,6 +182,13 @@ jobs:
179182
- name: show the current environment
180183
run: src/ci/scripts/dump-environment.sh
181184

185+
# Pre-build citool before the following step uninstalls rustup
186+
# Build it into the build directory, to avoid modifying sources
187+
- name: build citool
188+
run: |
189+
cd src/ci/citool
190+
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
191+
182192
- name: run the build
183193
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
184194
run: src/ci/scripts/run-build-from-ci.sh 2>&1
@@ -215,16 +225,22 @@ jobs:
215225
# erroring about invalid credentials instead.
216226
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
217227

228+
- name: postprocess metrics into the summary
229+
run: |
230+
if [ -f build/metrics.json ]; then
231+
./build/citool/debug/citool postprocess-metrics build/metrics.json ${GITHUB_STEP_SUMMARY}
232+
elif [ -f obj/build/metrics.json ]; then
233+
./build/citool/debug/citool postprocess-metrics obj/build/metrics.json ${GITHUB_STEP_SUMMARY}
234+
else
235+
echo "No metrics.json found"
236+
fi
237+
218238
- name: upload job metrics to DataDog
219239
if: needs.calculate_matrix.outputs.run_type != 'pr'
220240
env:
221-
DATADOG_SITE: datadoghq.com
222241
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
223242
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
224-
run: |
225-
cd src/ci
226-
npm ci
227-
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
243+
run: ./build/citool/debug/citool upload-build-metrics build/cpu-usage.csv
228244

229245
# This job isused to tell bors the final status of the build, as there is no practical way to detect
230246
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).

.github/workflows/post-merge.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Workflow that runs after a merge to master, analyses changes in test executions
2+
# and posts the result to the merged PR.
3+
4+
name: Post merge analysis
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
analysis:
13+
runs-on: ubuntu-24.04
14+
if: github.repository == 'rust-lang/rust'
15+
permissions:
16+
pull-requests: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
# Make sure that we have enough commits to find the parent merge commit.
21+
# Since all merges should be through merge commits, fetching two commits
22+
# should be enough to get the parent bors merge commit.
23+
fetch-depth: 2
24+
- name: Perform analysis and send PR
25+
env:
26+
GH_TOKEN: ${{ github.token }}
27+
run: |
28+
# Get closest bors merge commit
29+
PARENT_COMMIT=`git rev-list --author='bors <[email protected]>' -n1 --first-parent HEAD^1`
30+
echo "Parent: ${PARENT_COMMIT}"
31+
32+
# Find PR for the current commit
33+
HEAD_PR=`gh pr list --search "${{ github.sha }}" --state merged --json number --jq '.[0].number'`
34+
echo "HEAD: ${{ github.sha }} (#${HEAD_PR})"
35+
36+
cd src/ci/citool
37+
38+
echo "Post-merge analysis result" > output.log
39+
cargo run --release post-merge-report ${PARENT_COMMIT} ${{ github.sha }} >> output.log
40+
cat output.log
41+
42+
gh pr comment ${HEAD_PR} -F output.log

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ no_llvm_build
5353
/target
5454
/library/target
5555
/src/bootstrap/target
56+
/src/ci/citool/target
5657
/src/tools/x/target
5758
# Created by `x vendor`
5859
/vendor

.mailmap

+3
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ James Hinshelwood <[email protected]> <[email protected]>
292292
293293
James Perry <[email protected]>
294294
James Sanderson <[email protected]>
295+
Jana Dönszelmann <[email protected]>
296+
297+
295298
296299
Jaro Fietz <[email protected]>
297300
Jason Fager <[email protected]>

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For submodules, changes need to be made against the repository corresponding the
1818
submodule, and not the main `rust-lang/rust` repository.
1919

2020
For subtrees, prefer sending a PR against the subtree's repository if it does
21-
not need to be made against the main `rust-lang/rust` repostory (e.g. a
21+
not need to be made against the main `rust-lang/rust` repository (e.g. a
2222
rustc-dev-guide change that does not accompany a compiler change).
2323

2424
## About the [rustc-dev-guide]

Cargo.lock

+39-19
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ dependencies = [
358358
"cargo_metadata 0.18.1",
359359
"directories",
360360
"rustc-build-sysroot",
361-
"rustc_tools_util",
361+
"rustc_tools_util 0.4.0",
362362
"rustc_version",
363363
"serde",
364364
"serde_json",
@@ -407,9 +407,9 @@ version = "0.1.0"
407407

408408
[[package]]
409409
name = "cc"
410-
version = "1.2.13"
410+
version = "1.2.16"
411411
source = "registry+https://github.com/rust-lang/crates.io-index"
412-
checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda"
412+
checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
413413
dependencies = [
414414
"shlex",
415415
]
@@ -522,7 +522,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
522522

523523
[[package]]
524524
name = "clippy"
525-
version = "0.1.86"
525+
version = "0.1.87"
526526
dependencies = [
527527
"anstream",
528528
"cargo_metadata 0.18.1",
@@ -539,7 +539,7 @@ dependencies = [
539539
"quote",
540540
"regex",
541541
"rinja",
542-
"rustc_tools_util",
542+
"rustc_tools_util 0.4.2",
543543
"serde",
544544
"serde_json",
545545
"syn 2.0.96",
@@ -553,7 +553,7 @@ dependencies = [
553553

554554
[[package]]
555555
name = "clippy_config"
556-
version = "0.1.86"
556+
version = "0.1.87"
557557
dependencies = [
558558
"clippy_utils",
559559
"itertools",
@@ -578,7 +578,7 @@ dependencies = [
578578

579579
[[package]]
580580
name = "clippy_lints"
581-
version = "0.1.86"
581+
version = "0.1.87"
582582
dependencies = [
583583
"arrayvec",
584584
"cargo_metadata 0.18.1",
@@ -601,7 +601,7 @@ dependencies = [
601601

602602
[[package]]
603603
name = "clippy_utils"
604-
version = "0.1.86"
604+
version = "0.1.87"
605605
dependencies = [
606606
"arrayvec",
607607
"itertools",
@@ -1491,6 +1491,7 @@ version = "0.15.2"
14911491
source = "registry+https://github.com/rust-lang/crates.io-index"
14921492
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
14931493
dependencies = [
1494+
"allocator-api2",
14941495
"foldhash",
14951496
"serde",
14961497
]
@@ -2526,6 +2527,16 @@ version = "0.2.0"
25262527
source = "registry+https://github.com/rust-lang/crates.io-index"
25272528
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
25282529

2530+
[[package]]
2531+
name = "os_pipe"
2532+
version = "1.2.1"
2533+
source = "registry+https://github.com/rust-lang/crates.io-index"
2534+
checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982"
2535+
dependencies = [
2536+
"libc",
2537+
"windows-sys 0.59.0",
2538+
]
2539+
25292540
[[package]]
25302541
name = "overload"
25312542
version = "0.1.1"
@@ -2871,11 +2882,11 @@ dependencies = [
28712882

28722883
[[package]]
28732884
name = "rand_xoshiro"
2874-
version = "0.6.0"
2885+
version = "0.7.0"
28752886
source = "registry+https://github.com/rust-lang/crates.io-index"
2876-
checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
2887+
checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41"
28772888
dependencies = [
2878-
"rand_core 0.6.4",
2889+
"rand_core 0.9.0",
28792890
]
28802891

28812892
[[package]]
@@ -3050,6 +3061,7 @@ dependencies = [
30503061
"gimli 0.31.1",
30513062
"libc",
30523063
"object 0.36.7",
3064+
"os_pipe",
30533065
"regex",
30543066
"serde_json",
30553067
"similar",
@@ -3144,7 +3156,7 @@ name = "rustc_abi"
31443156
version = "0.0.0"
31453157
dependencies = [
31463158
"bitflags",
3147-
"rand 0.8.5",
3159+
"rand 0.9.0",
31483160
"rand_xoshiro",
31493161
"rustc_data_structures",
31503162
"rustc_hashes",
@@ -3286,6 +3298,7 @@ dependencies = [
32863298
"rustc_hir",
32873299
"rustc_lexer",
32883300
"rustc_macros",
3301+
"rustc_middle",
32893302
"rustc_serialize",
32903303
"rustc_session",
32913304
"rustc_span",
@@ -3480,6 +3493,7 @@ dependencies = [
34803493
"either",
34813494
"elsa",
34823495
"ena",
3496+
"hashbrown 0.15.2",
34833497
"indexmap",
34843498
"jobserver",
34853499
"libc",
@@ -3741,7 +3755,7 @@ dependencies = [
37413755
"rustc_abi",
37423756
"rustc_ast",
37433757
"rustc_ast_pretty",
3744-
"rustc_attr_parsing",
3758+
"rustc_attr_data_structures",
37453759
"rustc_hir",
37463760
"rustc_span",
37473761
]
@@ -3777,7 +3791,7 @@ dependencies = [
37773791
name = "rustc_incremental"
37783792
version = "0.0.0"
37793793
dependencies = [
3780-
"rand 0.8.5",
3794+
"rand 0.9.0",
37813795
"rustc_ast",
37823796
"rustc_data_structures",
37833797
"rustc_errors",
@@ -3916,6 +3930,7 @@ dependencies = [
39163930
"rustc_target",
39173931
"rustc_trait_selection",
39183932
"rustc_type_ir",
3933+
"smallvec",
39193934
"tracing",
39203935
"unicode-security",
39213936
]
@@ -4008,7 +4023,8 @@ dependencies = [
40084023
"rustc_apfloat",
40094024
"rustc_arena",
40104025
"rustc_ast",
4011-
"rustc_attr_parsing",
4026+
"rustc_ast_ir",
4027+
"rustc_attr_data_structures",
40124028
"rustc_data_structures",
40134029
"rustc_error_messages",
40144030
"rustc_errors",
@@ -4453,6 +4469,10 @@ version = "0.4.0"
44534469
source = "registry+https://github.com/rust-lang/crates.io-index"
44544470
checksum = "3316159ab19e19d1065ecc49278e87f767a9dae9fae80348d2b4d4fa4ae02d4d"
44554471

4472+
[[package]]
4473+
name = "rustc_tools_util"
4474+
version = "0.4.2"
4475+
44564476
[[package]]
44574477
name = "rustc_trait_selection"
44584478
version = "0.0.0"
@@ -4500,8 +4520,6 @@ dependencies = [
45004520
"rustc_abi",
45014521
"rustc_data_structures",
45024522
"rustc_hir",
4503-
"rustc_infer",
4504-
"rustc_macros",
45054523
"rustc_middle",
45064524
"rustc_span",
45074525
"tracing",
@@ -4513,6 +4531,7 @@ version = "0.0.0"
45134531
dependencies = [
45144532
"itertools",
45154533
"rustc_abi",
4534+
"rustc_attr_parsing",
45164535
"rustc_data_structures",
45174536
"rustc_errors",
45184537
"rustc_fluent_macro",
@@ -5160,8 +5179,8 @@ version = "0.1.0"
51605179
dependencies = [
51615180
"indicatif",
51625181
"num",
5163-
"rand 0.8.5",
5164-
"rand_chacha 0.3.1",
5182+
"rand 0.9.0",
5183+
"rand_chacha 0.9.0",
51655184
"rayon",
51665185
]
51675186

@@ -5257,6 +5276,7 @@ dependencies = [
52575276
"serde",
52585277
"similar",
52595278
"termcolor",
5279+
"toml 0.7.8",
52605280
"walkdir",
52615281
]
52625282

INSTALL.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,13 @@ itself back on after some time).
210210

211211
### MSVC
212212

213-
MSVC builds of Rust additionally require an installation of Visual Studio 2017
214-
(or later) so `rustc` can use its linker. The simplest way is to get
215-
[Visual Studio], check the "C++ build tools" and "Windows 10 SDK" workload.
213+
MSVC builds of Rust additionally requires an installation of:
214+
215+
- Visual Studio 2022 (or later) build tools so `rustc` can use its linker. Older
216+
Visual Studio versions such as 2019 *may* work but aren't actively tested.
217+
- A recent Windows 10 or 11 SDK.
218+
219+
The simplest way is to get [Visual Studio], check the "C++ build tools".
216220

217221
[Visual Studio]: https://visualstudio.microsoft.com/downloads/
218222

compiler/rustc_abi/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ edition = "2024"
66
[dependencies]
77
# tidy-alphabetical-start
88
bitflags = "2.4.1"
9-
rand = { version = "0.8.4", default-features = false, optional = true }
10-
rand_xoshiro = { version = "0.6.0", optional = true }
11-
rustc_data_structures = { path = "../rustc_data_structures", optional = true }
9+
rand = { version = "0.9.0", default-features = false, optional = true }
10+
rand_xoshiro = { version = "0.7.0", optional = true }
11+
rustc_data_structures = { path = "../rustc_data_structures", optional = true }
1212
rustc_hashes = { path = "../rustc_hashes" }
1313
rustc_index = { path = "../rustc_index", default-features = false }
1414
rustc_macros = { path = "../rustc_macros", optional = true }
15-
rustc_serialize = { path = "../rustc_serialize", optional = true }
15+
rustc_serialize = { path = "../rustc_serialize", optional = true }
1616
rustc_span = { path = "../rustc_span", optional = true }
1717
tracing = "0.1"
1818
# tidy-alphabetical-end

0 commit comments

Comments
 (0)