Skip to content

Commit 5008c6a

Browse files
authored
Merge pull request #19702 from lnicola/sync-from-rust
internal: Sync from downstream
2 parents 4ed9b12 + f89fcbe commit 5008c6a

File tree

7,084 files changed

+125121
-81419
lines changed

Some content is hidden

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

7,084 files changed

+125121
-81419
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ ec2cc761bc7067712ecc7734502f703fe3b024c8
3131
c682aa162b0d41e21cc6748f4fecfe01efb69d1f
3232
# reformat with updated edition 2024
3333
1fcae03369abb4c2cc180cd5a49e1f4440a81300
34+
# Breaking up of compiletest runtest.rs
35+
60600a6fa403216bfd66e04f948b1822f6450af7

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.h rust
66
*.rs rust diff=rust
77
*.fixed linguist-language=Rust
8+
*.pp linguist-language=Rust
89
*.mir linguist-language=Rust
910
src/etc/installer/gfx/* binary
1011
src/vendor/** -text

.github/ISSUE_TEMPLATE/bootstrap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Describe what you expected to happen.
3232
Describe what actually happened.
3333
-->
3434

35-
### Bootstrap configuration (config.toml)
35+
### Bootstrap configuration (bootstrap.toml)
3636
```toml
3737
<config>
3838
```

.github/ISSUE_TEMPLATE/library_tracking_issue.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Library Tracking Issue
33
about: A tracking issue for an unstable library feature.
44
title: Tracking Issue for XXX
5-
labels: C-tracking-issue, T-libs-api
5+
labels: C-tracking-issue, T-libs-api, S-tracking-unimplemented
66
---
77
<!--
88
Thank you for creating a tracking issue!
@@ -49,6 +49,8 @@ For larger features, more steps might be involved.
4949
If the feature is changed later, please add those PRs here as well.
5050
-->
5151

52+
(Remember to update the `S-tracking-*` label when checking boxes.)
53+
5254
- [ ] Implementation: #...
5355
- [ ] Final comment period (FCP)[^1]
5456
- [ ] Stabilization PR

.github/ISSUE_TEMPLATE/tracking_issue.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ for larger features an implementation could be broken up into multiple PRs.
4141
- [ ] Implement the RFC (cc @rust-lang/XXX -- can anyone write up mentoring
4242
instructions?)
4343
- [ ] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide])
44-
- [ ] Formatting for new syntax has been added to the [Style Guide] ([nightly-style-procedure])
44+
- [ ] Style updates for any new syntax ([nightly-style-procedure])
45+
- [ ] Style team decision on new formatting
46+
- [ ] Formatting for new syntax has been added to the [Style Guide]
47+
- [ ] (non-blocking) Formatting has been implemented in `rustfmt`
4548
- [ ] Stabilization PR ([see instructions on rustc-dev-guide][stabilization-guide])
4649

4750
[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr

.github/workflows/ci.yml

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ jobs:
5353
steps:
5454
- name: Checkout the source code
5555
uses: actions/checkout@v4
56+
# Cache citool to make its build faster, as it's in the critical path.
57+
# The rust-cache doesn't bleed into the main `job`, so it should not affect any other
58+
# Rust compilation.
59+
- name: Cache citool
60+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
61+
with:
62+
workspaces: src/ci/citool
5663
- name: Calculate the CI job matrix
5764
env:
5865
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
@@ -68,6 +75,9 @@ jobs:
6875
timeout-minutes: 360
6976
env:
7077
CI_JOB_NAME: ${{ matrix.name }}
78+
CI_JOB_DOC_URL: ${{ matrix.doc_url }}
79+
GITHUB_WORKFLOW_RUN_ID: ${{ github.run_id }}
80+
GITHUB_REPOSITORY: ${{ github.repository }}
7181
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
7282
# commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
7383
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -81,6 +91,17 @@ jobs:
8191
# Check the `calculate_matrix` job to see how is the matrix defined.
8292
include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
8393
steps:
94+
- name: Install cargo in AWS CodeBuild
95+
if: matrix.codebuild
96+
run: |
97+
# Check if cargo is installed
98+
if ! command -v cargo &> /dev/null; then
99+
echo "Cargo not found, installing Rust..."
100+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
101+
# Make cargo available in PATH
102+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
103+
fi
104+
84105
- name: disable git crlf conversion
85106
run: git config --global core.autocrlf false
86107

@@ -115,9 +136,6 @@ jobs:
115136
# which then uses log commands to actually set them.
116137
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
117138

118-
- name: setup upstream remote
119-
run: src/ci/scripts/setup-upstream-remote.sh
120-
121139
- name: ensure the channel matches the target branch
122140
run: src/ci/scripts/verify-channel.sh
123141

@@ -158,6 +176,8 @@ jobs:
158176
run: src/ci/scripts/install-ninja.sh
159177

160178
- name: enable ipv6 on Docker
179+
# Don't run on codebuild because systemctl is not available
180+
if: ${{ !matrix.codebuild }}
161181
run: src/ci/scripts/enable-docker-ipv6.sh
162182

163183
# Disable automatic line ending conversion (again). On Windows, when we're
@@ -190,8 +210,20 @@ jobs:
190210
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
191211
192212
- name: run the build
193-
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
194-
run: src/ci/scripts/run-build-from-ci.sh 2>&1
213+
run: |
214+
set +e
215+
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
216+
src/ci/scripts/run-build-from-ci.sh 2>&1
217+
STATUS=$?
218+
set -e
219+
220+
if [[ "$STATUS" -ne 0 && -n "$CI_JOB_DOC_URL" ]]; then
221+
echo "****************************************************************************"
222+
echo "To find more information about this job, visit the following URL:"
223+
echo "$CI_JOB_DOC_URL"
224+
echo "****************************************************************************"
225+
fi
226+
exit ${STATUS}
195227
env:
196228
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
197229
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
@@ -226,16 +258,31 @@ jobs:
226258
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
227259

228260
- name: postprocess metrics into the summary
261+
# This step is not critical, and if some I/O problem happens, we don't want
262+
# to cancel the build.
263+
continue-on-error: true
229264
run: |
230265
if [ -f build/metrics.json ]; then
231-
./build/citool/debug/citool postprocess-metrics build/metrics.json ${GITHUB_STEP_SUMMARY}
266+
METRICS=build/metrics.json
232267
elif [ -f obj/build/metrics.json ]; then
233-
./build/citool/debug/citool postprocess-metrics obj/build/metrics.json ${GITHUB_STEP_SUMMARY}
268+
METRICS=obj/build/metrics.json
234269
else
235270
echo "No metrics.json found"
271+
exit 0
236272
fi
237273
274+
# Get closest bors merge commit
275+
PARENT_COMMIT=`git rev-list --author='bors <[email protected]>' -n1 --first-parent HEAD^1`
276+
277+
./build/citool/debug/citool postprocess-metrics \
278+
--job-name ${CI_JOB_NAME} \
279+
--parent ${PARENT_COMMIT} \
280+
${METRICS} >> ${GITHUB_STEP_SUMMARY}
281+
238282
- name: upload job metrics to DataDog
283+
# This step is not critical, and if some I/O problem happens, we don't want
284+
# to cancel the build.
285+
continue-on-error: true
239286
if: needs.calculate_matrix.outputs.run_type != 'pr'
240287
env:
241288
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}

.github/workflows/ghcr.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# Docker Hub has a rate limit, while ghcr.io doesn't.
66
# Those images are pushed to ghcr.io by this job.
77
#
8+
# While Docker Hub rate limit *shouldn't* be an issue on GitHub Actions,
9+
# it certainly is for AWS codebuild.
10+
#
811
# Note that authenticating to DockerHub or other registries isn't possible
912
# for PR jobs, because forks can't access secrets.
1013
# That's why we use ghcr.io: it has no rate limit and it doesn't require authentication.
@@ -54,6 +57,10 @@ jobs:
5457
"ubuntu:22.04"
5558
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
5659
"moby/buildkit:buildx-stable-1"
60+
# Mirrored because used when CI is running inside a Docker container
61+
"alpine:3.4"
62+
# Mirrored because used by dist-x86_64-linux
63+
"centos:7"
5764
)
5865
5966
# Mirror each image from DockerHub to ghcr.io

.github/workflows/post-merge.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,31 @@ jobs:
1616
pull-requests: write
1717
steps:
1818
- 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
1924
- name: Perform analysis and send PR
25+
env:
26+
GH_TOKEN: ${{ github.token }}
2027
run: |
2128
# Get closest bors merge commit
2229
PARENT_COMMIT=`git rev-list --author='bors <[email protected]>' -n1 --first-parent HEAD^1`
30+
echo "Parent: ${PARENT_COMMIT}"
2331
2432
# Find PR for the current commit
2533
HEAD_PR=`gh pr list --search "${{ github.sha }}" --state merged --json number --jq '.[0].number'`
26-
27-
echo "Parent: ${PARENT_COMMIT}"
2834
echo "HEAD: ${{ github.sha }} (#${HEAD_PR})"
2935
3036
cd src/ci/citool
3137
32-
echo "Post-merge analysis result" > output.log
33-
cargo run --release post-merge-analysis ${PARENT_COMMIT} ${{ github.sha }} >> output.log
38+
printf "<details>\n<summary>What is this?</summary>\n" >> output.log
39+
printf "This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.\n" >> output.log
40+
printf "</details>\n\n" >> output.log
41+
42+
cargo run --release post-merge-report ${PARENT_COMMIT} ${{ github.sha }} >> output.log
43+
3444
cat output.log
3545
3646
gh pr comment ${HEAD_PR} -F output.log

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file should only ignore things that are generated during a `x.py` build,
22
# generated by common IDEs, and optional files controlled by the user that
3-
# affect the build (such as config.toml).
3+
# affect the build (such as bootstrap.toml).
44
# In particular, things like `mir_dump` should not be listed here; they are only
55
# created during manual debugging and many people like to clean up instead of
66
# having git ignore such leftovers. You can use `.git/info/exclude` to
@@ -34,6 +34,7 @@ Session.vim
3434
!/tests/run-make/thumb-none-qemu/example/.cargo
3535

3636
## Configuration
37+
/bootstrap.toml
3738
/config.toml
3839
/Makefile
3940
config.mk

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
shallow = true
4646
[submodule "src/tools/enzyme"]
4747
path = src/tools/enzyme
48-
url = https://github.com/EnzymeAD/Enzyme.git
48+
url = https://github.com/rust-lang/Enzyme.git
4949
shallow = true
5050
[submodule "src/gcc"]
5151
path = src/gcc

.ignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# Make vscode *not* count `config.toml` as ignored, so it is included in search
1+
# Make vscode *not* count `bootstrap.toml` and `config.toml` as ignored, so it is included in search
2+
!/bootstrap.toml
23
!/config.toml

.mailmap

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Jacob Greenfield <[email protected]>
276276
277277
278278
Jake Goulding <[email protected]>
279-
279+
280280
281281
Jake Vossen <[email protected]>
282282
@@ -292,6 +292,7 @@ James Hinshelwood <[email protected]> <[email protected]>
292292
293293
James Perry <[email protected]>
294294
James Sanderson <[email protected]>
295+
295296
Jana Dönszelmann <[email protected]>
296297
297298
@@ -408,10 +409,13 @@ Luqman Aden <[email protected]> <[email protected]>
408409
409410
410411
Maik Klein <[email protected]>
412+
413+
411414
Malo Jaffré <[email protected]>
412415
Manish Goregaokar <[email protected]>
413416
414417
Marcell Pardavi <[email protected]>
418+
Marco Ieni <[email protected]>
415419
Marcus Klaas de Vries <[email protected]>
416420
Margaret Meyerhofer <[email protected]> <mmeyerho@andrew>
417421
Mark Mansi <[email protected]>
@@ -565,6 +569,9 @@ Robert Habermeier <[email protected]>
565569
Robert Millar <[email protected]>
566570
567571
Rohit Joshi <[email protected]> Rohit Joshi <[email protected]>
572+
Ross Smyth <[email protected]>
573+
574+
568575
Roxane Fruytier <[email protected]>
569576
570577
Russell Johnston <[email protected]>

0 commit comments

Comments
 (0)