Skip to content

Commit c074d8e

Browse files
committed
Auto merge of #135442 - antoyo:subtree-update_cg_gcc_2025_01_12, r=GuillaumeGomez
Subtree update cg_gcc 2025/01/12 r? GuillaumeGomez
2 parents a48e7b0 + f3cfff7 commit c074d8e

Some content is hidden

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

51 files changed

+836
-1530
lines changed

compiler/rustc_codegen_gcc/.github/workflows/ci.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- { gcc: "gcc-13.deb" }
2323
- { gcc: "gcc-13-without-int128.deb" }
2424
commands: [
25-
"--mini-tests",
2625
"--std-tests",
2726
# FIXME: re-enable asm tests when GCC can emit in the right syntax.
2827
# "--asm-tests",
@@ -79,6 +78,7 @@ jobs:
7978
run: |
8079
./y.sh prepare --only-libcore
8180
./y.sh build --sysroot
81+
./y.sh test --mini-tests
8282
cargo test
8383
8484
- name: Run y.sh cargo build
@@ -87,17 +87,14 @@ jobs:
8787
8888
- name: Clean
8989
run: |
90-
./y.sh clean all
90+
./y.sh clean all
9191
9292
- name: Prepare dependencies
9393
run: |
9494
git config --global user.email "user@example.com"
9595
git config --global user.name "User"
9696
./y.sh prepare
9797
98-
- name: Add more failing tests because the sysroot is not compiled with LTO
99-
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
100-
10198
- name: Run tests
10299
run: |
103100
./y.sh test --release --clean --build-sysroot ${{ matrix.commands }}

compiler/rustc_codegen_gcc/.github/workflows/failures.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,20 @@ jobs:
9090
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
9191
run: ./y.sh prepare
9292

93-
- name: Add more failing tests because the sysroot is not compiled with LTO
94-
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
95-
9693
- name: Run tests
9794
# TODO: re-enable those tests for libgccjit 12.
9895
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
9996
id: tests
10097
run: |
101-
${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --clean --build-sysroot --test-failing-rustc ${{ matrix.libgccjit_version.extra }} | tee output_log
98+
${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --clean --build-sysroot --test-failing-rustc ${{ matrix.libgccjit_version.extra }} 2>&1 | tee output_log
10299
rg --text "test result" output_log >> $GITHUB_STEP_SUMMARY
103100
104101
- name: Run failing ui pattern tests for ICE
105102
# TODO: re-enable those tests for libgccjit 12.
106103
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
107104
id: ui-tests
108105
run: |
109-
${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --test-failing-ui-pattern-tests ${{ matrix.libgccjit_version.extra }} | tee output_log_ui
106+
${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --test-failing-ui-pattern-tests ${{ matrix.libgccjit_version.extra }} 2>&1 | tee output_log_ui
110107
if grep -q "the compiler unexpectedly panicked" output_log_ui; then
111108
echo "Error: 'the compiler unexpectedly panicked' found in output logs. CI Error!!"
112109
exit 1

compiler/rustc_codegen_gcc/.github/workflows/gcc12.yml

-3
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ jobs:
8282
#- name: Add more failing tests for GCC 12
8383
#run: cat tests/failing-ui-tests12.txt >> tests/failing-ui-tests.txt
8484

85-
#- name: Add more failing tests because the sysroot is not compiled with LTO
86-
#run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
87-
8885
#- name: Run tests
8986
#run: |
9087
#./y.sh test --release --clean --build-sysroot ${{ matrix.commands }} --no-default-features

compiler/rustc_codegen_gcc/.github/workflows/m68k.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
commands: [
26-
"--mini-tests",
2726
"--std-tests",
2827
# TODO(antoyo): fix those on m68k.
2928
#"--test-libcore",
@@ -93,6 +92,7 @@ jobs:
9392
run: |
9493
./y.sh prepare --only-libcore --cross
9594
./y.sh build --sysroot --features compiler_builtins/no-f16-f128 --target-triple m68k-unknown-linux-gnu
95+
./y.sh test --mini-tests
9696
CG_GCC_TEST_TARGET=m68k-unknown-linux-gnu cargo test
9797
./y.sh clean all
9898
@@ -102,9 +102,6 @@ jobs:
102102
git config --global user.name "User"
103103
./y.sh prepare --cross
104104
105-
- name: Add more failing tests because the sysroot is not compiled with LTO
106-
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
107-
108105
- name: Run tests
109106
run: |
110107
./y.sh test --release --clean --build-sysroot --sysroot-features compiler_builtins/no-f16-f128 ${{ matrix.commands }}

compiler/rustc_codegen_gcc/.github/workflows/release.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
build:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-22.04
1717

1818
strategy:
1919
fail-fast: false
@@ -54,6 +54,7 @@ jobs:
5454
run: |
5555
./y.sh prepare --only-libcore
5656
EMBED_LTO_BITCODE=1 ./y.sh build --sysroot --release --release-sysroot
57+
./y.sh test --mini-tests
5758
cargo test
5859
./y.sh clean all
5960
@@ -70,4 +71,9 @@ jobs:
7071
run: |
7172
# FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros.
7273
echo -n 'lto = "fat"' >> build_system/build_sysroot/Cargo.toml
73-
EMBED_LTO_BITCODE=1 ./y.sh test --release --clean --release-sysroot --build-sysroot ${{ matrix.commands }}
74+
EMBED_LTO_BITCODE=1 ./y.sh test --release --clean --release-sysroot --build-sysroot --keep-lto-tests ${{ matrix.commands }}
75+
76+
- name: Run y.sh cargo build
77+
run: |
78+
EMBED_LTO_BITCODE=1 CHANNEL="release" ./y.sh cargo build --release --manifest-path tests/hello-world/Cargo.toml
79+
# TODO: grep the asm output for "call my_func" and fail if it is found.

compiler/rustc_codegen_gcc/.github/workflows/stdarch.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ jobs:
7373
echo "LD_LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV
7474
echo "LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV
7575
76-
- name: Build (part 2)
77-
run: |
78-
cargo test
79-
8076
- name: Clean
8177
if: ${{ !matrix.cargo_runner }}
8278
run: |
@@ -92,6 +88,7 @@ jobs:
9288
if: ${{ !matrix.cargo_runner }}
9389
run: |
9490
./y.sh test --release --clean --release-sysroot --build-sysroot --mini-tests --std-tests --test-libcore
91+
cargo test
9592
9693
- name: Run stdarch tests
9794
if: ${{ !matrix.cargo_runner }}
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
version = "Two"
1+
style_edition = "2024"
22
use_small_heuristics = "Max"
33
merge_derives = false
4+
group_imports = "StdExternalCrate"
5+
imports_granularity = "Module"

compiler/rustc_codegen_gcc/Cargo.lock

+147-7
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 = "aho-corasick"
@@ -11,12 +11,40 @@ dependencies = [
1111
"memchr",
1212
]
1313

14+
[[package]]
15+
name = "bitflags"
16+
version = "2.6.0"
17+
source = "registry+https://github.com/rust-lang/crates.io-index"
18+
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
19+
1420
[[package]]
1521
name = "boml"
1622
version = "0.3.1"
1723
source = "registry+https://github.com/rust-lang/crates.io-index"
1824
checksum = "85fdb93f04c73bff54305fa437ffea5449c41edcaadfe882f35836206b166ac5"
1925

26+
[[package]]
27+
name = "cfg-if"
28+
version = "1.0.0"
29+
source = "registry+https://github.com/rust-lang/crates.io-index"
30+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
31+
32+
[[package]]
33+
name = "errno"
34+
version = "0.3.10"
35+
source = "registry+https://github.com/rust-lang/crates.io-index"
36+
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
37+
dependencies = [
38+
"libc",
39+
"windows-sys",
40+
]
41+
42+
[[package]]
43+
name = "fastrand"
44+
version = "2.3.0"
45+
source = "registry+https://github.com/rust-lang/crates.io-index"
46+
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
47+
2048
[[package]]
2149
name = "fm"
2250
version = "0.2.2"
@@ -28,18 +56,18 @@ dependencies = [
2856

2957
[[package]]
3058
name = "gccjit"
31-
version = "2.2.0"
59+
version = "2.4.0"
3260
source = "registry+https://github.com/rust-lang/crates.io-index"
33-
checksum = "4bb376e98c82d9284c3a17fc1d6bf9bc921055418950238d7a553c27a7e1f6ab"
61+
checksum = "72fd91f4adbf02b53cfc73c97bc33c5f253009043f30c56a5ec08dd5c8094dc8"
3462
dependencies = [
3563
"gccjit_sys",
3664
]
3765

3866
[[package]]
3967
name = "gccjit_sys"
40-
version = "0.3.0"
68+
version = "0.5.0"
4169
source = "registry+https://github.com/rust-lang/crates.io-index"
42-
checksum = "93b4b1be553b5df790bf25ca2a1d6add81727dc29f8d5c8742468ed306d621d1"
70+
checksum = "0fb7b8f48a75e2cfe78c3d9a980b32771c34ffd12d196021ab3f98c49fbd2f0d"
4371
dependencies = [
4472
"libc",
4573
]
@@ -77,9 +105,15 @@ dependencies = [
77105

78106
[[package]]
79107
name = "libc"
80-
version = "0.2.150"
108+
version = "0.2.168"
81109
source = "registry+https://github.com/rust-lang/crates.io-index"
82-
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
110+
checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
111+
112+
[[package]]
113+
name = "linux-raw-sys"
114+
version = "0.4.14"
115+
source = "registry+https://github.com/rust-lang/crates.io-index"
116+
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
83117

84118
[[package]]
85119
name = "memchr"
@@ -97,6 +131,12 @@ dependencies = [
97131
"libc",
98132
]
99133

134+
[[package]]
135+
name = "once_cell"
136+
version = "1.20.2"
137+
source = "registry+https://github.com/rust-lang/crates.io-index"
138+
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
139+
100140
[[package]]
101141
name = "regex"
102142
version = "1.8.4"
@@ -121,6 +161,20 @@ dependencies = [
121161
"boml",
122162
"gccjit",
123163
"lang_tester",
164+
"tempfile",
165+
]
166+
167+
[[package]]
168+
name = "rustix"
169+
version = "0.38.42"
170+
source = "registry+https://github.com/rust-lang/crates.io-index"
171+
checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
172+
dependencies = [
173+
"bitflags",
174+
"errno",
175+
"libc",
176+
"linux-raw-sys",
177+
"windows-sys",
124178
]
125179

126180
[[package]]
@@ -132,6 +186,19 @@ dependencies = [
132186
"winapi-util",
133187
]
134188

189+
[[package]]
190+
name = "tempfile"
191+
version = "3.14.0"
192+
source = "registry+https://github.com/rust-lang/crates.io-index"
193+
checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
194+
dependencies = [
195+
"cfg-if",
196+
"fastrand",
197+
"once_cell",
198+
"rustix",
199+
"windows-sys",
200+
]
201+
135202
[[package]]
136203
name = "termcolor"
137204
version = "1.2.0"
@@ -205,3 +272,76 @@ name = "winapi-x86_64-pc-windows-gnu"
205272
version = "0.4.0"
206273
source = "registry+https://github.com/rust-lang/crates.io-index"
207274
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
275+
276+
[[package]]
277+
name = "windows-sys"
278+
version = "0.59.0"
279+
source = "registry+https://github.com/rust-lang/crates.io-index"
280+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
281+
dependencies = [
282+
"windows-targets",
283+
]
284+
285+
[[package]]
286+
name = "windows-targets"
287+
version = "0.52.6"
288+
source = "registry+https://github.com/rust-lang/crates.io-index"
289+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
290+
dependencies = [
291+
"windows_aarch64_gnullvm",
292+
"windows_aarch64_msvc",
293+
"windows_i686_gnu",
294+
"windows_i686_gnullvm",
295+
"windows_i686_msvc",
296+
"windows_x86_64_gnu",
297+
"windows_x86_64_gnullvm",
298+
"windows_x86_64_msvc",
299+
]
300+
301+
[[package]]
302+
name = "windows_aarch64_gnullvm"
303+
version = "0.52.6"
304+
source = "registry+https://github.com/rust-lang/crates.io-index"
305+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
306+
307+
[[package]]
308+
name = "windows_aarch64_msvc"
309+
version = "0.52.6"
310+
source = "registry+https://github.com/rust-lang/crates.io-index"
311+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
312+
313+
[[package]]
314+
name = "windows_i686_gnu"
315+
version = "0.52.6"
316+
source = "registry+https://github.com/rust-lang/crates.io-index"
317+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
318+
319+
[[package]]
320+
name = "windows_i686_gnullvm"
321+
version = "0.52.6"
322+
source = "registry+https://github.com/rust-lang/crates.io-index"
323+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
324+
325+
[[package]]
326+
name = "windows_i686_msvc"
327+
version = "0.52.6"
328+
source = "registry+https://github.com/rust-lang/crates.io-index"
329+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
330+
331+
[[package]]
332+
name = "windows_x86_64_gnu"
333+
version = "0.52.6"
334+
source = "registry+https://github.com/rust-lang/crates.io-index"
335+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
336+
337+
[[package]]
338+
name = "windows_x86_64_gnullvm"
339+
version = "0.52.6"
340+
source = "registry+https://github.com/rust-lang/crates.io-index"
341+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
342+
343+
[[package]]
344+
name = "windows_x86_64_msvc"
345+
version = "0.52.6"
346+
source = "registry+https://github.com/rust-lang/crates.io-index"
347+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

compiler/rustc_codegen_gcc/Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ master = ["gccjit/master"]
2222
default = ["master"]
2323

2424
[dependencies]
25-
gccjit = "2.2"
25+
gccjit = "2.4"
2626
#gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
2727

2828
# Local copy.
2929
#gccjit = { path = "../gccjit.rs" }
3030

3131
[dev-dependencies]
32-
lang_tester = "0.8.0"
3332
boml = "0.3.1"
33+
lang_tester = "0.8.0"
34+
tempfile = "3.7.1"
3435

3536
[profile.dev]
3637
# By compiling dependencies with optimizations, performing tests gets much faster.

0 commit comments

Comments
 (0)