Skip to content

Commit a20f180

Browse files
committed
Merge branch 'master' into sync_from_rust_2026_07_14
2 parents 4534180 + 569b0b0 commit a20f180

50 files changed

Lines changed: 1443 additions & 387 deletions

Some content is hidden

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

.cspell.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"src/intrinsic/llvm.rs"
2323
],
2424
"ignoreRegExpList": [
25-
"/(FIXME|NOTE|TODO)\\([^)]+\\)/",
25+
"/(FIXME|NOTE)\\([^)]+\\)/",
2626
"__builtin_\\w*"
2727
]
2828
}

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- { gcc: "gcc-15.deb" }
2727
- { gcc: "gcc-15-without-int128.deb" }
2828
commands: [
29-
"--std-tests",
29+
"--std-tests --alloc-tests",
3030
# FIXME: re-enable asm tests when GCC can emit in the right syntax.
3131
# "--asm-tests",
3232
"--test-libcore",
@@ -36,6 +36,7 @@ jobs:
3636
"--test-successful-rustc --nb-parts 2 --current-part 0",
3737
"--test-successful-rustc --nb-parts 2 --current-part 1",
3838
"--projects",
39+
"--gcc-asm-tests",
3940
]
4041

4142
steps:
@@ -88,6 +89,9 @@ jobs:
8889
- name: Check formatting
8990
run: ./y.sh fmt --check
9091

92+
- name: Check todo
93+
run: ./y.sh check-todo
94+
9195
- name: clippy
9296
run: |
9397
cargo clippy --all-targets -- -D warnings
@@ -98,6 +102,7 @@ jobs:
98102
run: |
99103
./y.sh build --sysroot
100104
./y.sh test --cargo-tests
105+
CARGO_TEST_FLAGS="-Zmir-preserve-ub" ./y.sh test --cargo-tests -- mir_preserve_ub_empty_switch
101106
102107
- name: Run y.sh cargo build
103108
run: |

.github/workflows/stdarch.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
cargo_runner: [
24-
"sde -future -rtm_mode full --",
24+
"sde -cpuid-in /home/runner/work/rustc_codegen_gcc/rustc_codegen_gcc/tests/cpuid.def -rtm_mode full --",
2525
"",
2626
]
2727

@@ -51,10 +51,9 @@ jobs:
5151
mkdir intel-sde
5252
cd intel-sde
5353
version=10.8.0-2026-03-15
54-
url_path=915934
5554
dir=sde-external-$version-lin
5655
file=$dir.tar.xz
57-
wget https://downloadmirror.intel.com/$url_path/$file
56+
wget http://ci-mirrors.rust-lang.org/$file
5857
tar xvf $file
5958
sudo mkdir /usr/share/intel-sde
6059
sudo cp -r $dir/* /usr/share/intel-sde
@@ -90,14 +89,14 @@ jobs:
9089
- name: Run stdarch tests
9190
if: ${{ !matrix.cargo_runner }}
9291
run: |
93-
CHANNEL=release TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" ./y.sh cargo test --manifest-path build/build_sysroot/sysroot_src/library/stdarch/Cargo.toml
92+
./y.sh test --release --stdarch-tests
9493
9594
- name: Run stdarch tests
9695
if: ${{ matrix.cargo_runner }}
9796
run: |
9897
# FIXME: these tests fail when the sysroot is compiled with LTO because of a missing symbol in proc-macro.
99-
# FIXME: remove --skip test_tile_ when it's implemented.
100-
STDARCH_TEST_SKIP_FUNCTION="xsave,xsaveopt,xsave64,xsaveopt64" STDARCH_TEST_EVERYTHING=1 CHANNEL=release CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="${{ matrix.cargo_runner }}" TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" ./y.sh cargo test --manifest-path build/build_sysroot/sysroot_src/library/stdarch/Cargo.toml -- --skip rtm --skip tbm --skip sse4a --skip test_tile_
98+
# FIXME: remove --skip test_tile_ and --skip --skip test__tile when it's implemented.
99+
STDARCH_TEST_SKIP_FUNCTION="xsave,xsaveopt,xsave64,xsaveopt64" STDARCH_TEST_EVERYTHING=1 CHANNEL=release CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="${{ matrix.cargo_runner }}" TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" ./y.sh cargo test --manifest-path build/build_sysroot/sysroot_src/library/stdarch/Cargo.toml -- --skip rtm --skip tbm --skip sse4a --skip test_tile_ --skip test__tile
101100
102101
# Summary job for the merge queue.
103102
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ perf.data.old
77
*.events
88
*.string*
99
gimple*
10-
*asm
10+
*_asm
1111
res
1212
test-backend
1313
projects

Cargo.lock

Lines changed: 17 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
3131

3232
[[package]]
3333
name = "errno"
34-
version = "0.3.10"
34+
version = "0.3.14"
3535
source = "registry+https://github.com/rust-lang/crates.io-index"
36-
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
36+
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
3737
dependencies = [
3838
"libc",
3939
"windows-sys",
@@ -117,15 +117,15 @@ dependencies = [
117117

118118
[[package]]
119119
name = "libc"
120-
version = "0.2.168"
120+
version = "0.2.186"
121121
source = "registry+https://github.com/rust-lang/crates.io-index"
122-
checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
122+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
123123

124124
[[package]]
125125
name = "linux-raw-sys"
126-
version = "0.9.4"
126+
version = "0.12.1"
127127
source = "registry+https://github.com/rust-lang/crates.io-index"
128-
checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
128+
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
129129

130130
[[package]]
131131
name = "memchr"
@@ -194,9 +194,9 @@ dependencies = [
194194

195195
[[package]]
196196
name = "rustix"
197-
version = "1.0.7"
197+
version = "1.1.4"
198198
source = "registry+https://github.com/rust-lang/crates.io-index"
199-
checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
199+
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
200200
dependencies = [
201201
"bitflags",
202202
"errno",
@@ -216,9 +216,9 @@ dependencies = [
216216

217217
[[package]]
218218
name = "tempfile"
219-
version = "3.20.0"
219+
version = "3.27.0"
220220
source = "registry+https://github.com/rust-lang/crates.io-index"
221-
checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1"
221+
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
222222
dependencies = [
223223
"fastrand",
224224
"getrandom",
@@ -311,78 +311,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
311311
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
312312

313313
[[package]]
314-
name = "windows-sys"
315-
version = "0.59.0"
314+
name = "windows-link"
315+
version = "0.2.1"
316316
source = "registry+https://github.com/rust-lang/crates.io-index"
317-
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
318-
dependencies = [
319-
"windows-targets",
320-
]
317+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
321318

322319
[[package]]
323-
name = "windows-targets"
324-
version = "0.52.6"
320+
name = "windows-sys"
321+
version = "0.61.2"
325322
source = "registry+https://github.com/rust-lang/crates.io-index"
326-
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
323+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
327324
dependencies = [
328-
"windows_aarch64_gnullvm",
329-
"windows_aarch64_msvc",
330-
"windows_i686_gnu",
331-
"windows_i686_gnullvm",
332-
"windows_i686_msvc",
333-
"windows_x86_64_gnu",
334-
"windows_x86_64_gnullvm",
335-
"windows_x86_64_msvc",
325+
"windows-link",
336326
]
337327

338-
[[package]]
339-
name = "windows_aarch64_gnullvm"
340-
version = "0.52.6"
341-
source = "registry+https://github.com/rust-lang/crates.io-index"
342-
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
343-
344-
[[package]]
345-
name = "windows_aarch64_msvc"
346-
version = "0.52.6"
347-
source = "registry+https://github.com/rust-lang/crates.io-index"
348-
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
349-
350-
[[package]]
351-
name = "windows_i686_gnu"
352-
version = "0.52.6"
353-
source = "registry+https://github.com/rust-lang/crates.io-index"
354-
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
355-
356-
[[package]]
357-
name = "windows_i686_gnullvm"
358-
version = "0.52.6"
359-
source = "registry+https://github.com/rust-lang/crates.io-index"
360-
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
361-
362-
[[package]]
363-
name = "windows_i686_msvc"
364-
version = "0.52.6"
365-
source = "registry+https://github.com/rust-lang/crates.io-index"
366-
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
367-
368-
[[package]]
369-
name = "windows_x86_64_gnu"
370-
version = "0.52.6"
371-
source = "registry+https://github.com/rust-lang/crates.io-index"
372-
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
373-
374-
[[package]]
375-
name = "windows_x86_64_gnullvm"
376-
version = "0.52.6"
377-
source = "registry+https://github.com/rust-lang/crates.io-index"
378-
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
379-
380-
[[package]]
381-
name = "windows_x86_64_msvc"
382-
version = "0.52.6"
383-
source = "registry+https://github.com/rust-lang/crates.io-index"
384-
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
385-
386328
[[package]]
387329
name = "wit-bindgen-rt"
388330
version = "0.39.0"

Readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,21 @@ $ ./y.sh cargo build --manifest-path tests/hello-world/Cargo.toml
136136
### Cargo
137137

138138
```bash
139-
$ CHANNEL="release" $CG_GCCJIT_DIR/y.sh cargo run
139+
$ CHANNEL=release $CG_GCCJIT_DIR/y.sh cargo run
140140
```
141141

142-
If you compiled cg_gccjit in debug mode (aka you didn't pass `--release` to `./y.sh test`) you should use `CHANNEL="debug"` instead or omit `CHANNEL="release"` completely.
142+
If you compiled `cg_gcc` in debug mode (aka you didn't pass `--release` to `./y.sh build`) you should use `CHANNEL=debug` instead or omit `CHANNEL=release` completely.
143143

144144
### Rustc
145145

146146
If you want to run `rustc` directly, you can do so with:
147147

148148
```bash
149-
$ ./y.sh rustc my_crate.rs
149+
$ CHANNEL=release ./y.sh rustc my_crate.rs
150150
```
151151

152+
If you compiled `cg_gcc` in debug mode (aka you didn't pass `--release` to `./y.sh build`) you should use `CHANNEL=debug` instead or omit `CHANNEL=release` completely.
153+
152154
You can do the same manually (although we don't recommend it):
153155

154156
```bash

build_system/Cargo.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is automatically @generated by Cargo.
22
# It is not intended for manual editing.
3-
version = 3
3+
version = 4
44

55
[[package]]
66
name = "boml"

0 commit comments

Comments
 (0)