Skip to content

Commit af7ea31

Browse files
committed
Merge commit '69b3f5a426a5c1c05236a45b36f6679d95fbe01b' into sync_cg_clif-2024-08-09
2 parents 899eb03 + 69b3f5a commit af7ea31

29 files changed

+398
-850
lines changed

Diff for: compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ name: Abi-cafe
22

33
on:
44
- push
5+
- pull_request
56

67
permissions: {}
78

89
jobs:
910
abi_cafe:
1011
runs-on: ${{ matrix.os }}
11-
timeout-minutes: 60
12+
timeout-minutes: 30
1213
concurrency:
1314
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.env.TARGET_TRIPLE }}
1415
cancel-in-progress: true
@@ -27,12 +28,16 @@ jobs:
2728
- os: macos-latest
2829
env:
2930
TARGET_TRIPLE: x86_64-apple-darwin
30-
- os: windows-latest
31+
- os: macos-latest
3132
env:
32-
TARGET_TRIPLE: x86_64-pc-windows-msvc
33+
TARGET_TRIPLE: aarch64-apple-darwin
3334
- os: windows-latest
3435
env:
35-
TARGET_TRIPLE: x86_64-pc-windows-gnu
36+
TARGET_TRIPLE: x86_64-pc-windows-msvc
37+
# FIXME Currently hangs. Re-enable once this is fixed or abi-cafe adds a timeout.
38+
#- os: windows-latest
39+
# env:
40+
# TARGET_TRIPLE: x86_64-pc-windows-gnu
3641

3742
steps:
3843
- uses: actions/checkout@v4

Diff for: compiler/rustc_codegen_cranelift/.github/workflows/audit.yml

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- run: |
1515
sed -i 's/components.*/components = []/' rust-toolchain
16-
echo 'profile = "minimal"' >> rust-toolchain
1716
- uses: rustsec/[email protected]
1817
with:
1918
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: compiler/rustc_codegen_cranelift/.github/workflows/main.yml

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
- name: Avoid installing rustc-dev
3030
run: |
3131
sed -i 's/components.*/components = ["rustfmt"]/' rust-toolchain
32-
echo 'profile = "minimal"' >> rust-toolchain
3332
rustfmt -v
3433
3534
- name: Rustfmt

Diff for: compiler/rustc_codegen_cranelift/.zed/settings.json

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"format_on_save": "on",
3+
"lsp": {
4+
"rust-analyzer": {
5+
"initialization_options": {
6+
"diagnostics": {
7+
// in case rustc.source is disabled for performance reasons; disable the errors about this
8+
"disabled": ["unresolved-extern-crate", "unresolved-macro-call"]
9+
},
10+
"rustc": {
11+
"source": "discover"
12+
},
13+
"imports": {
14+
"granularity": {
15+
"enforce": true,
16+
"group": "module"
17+
},
18+
"prefix": "crate"
19+
},
20+
"cargo": {
21+
"features": ["unstable-features"]
22+
},
23+
"linkedProjects": [
24+
"./Cargo.toml",
25+
"./build_system/Cargo.toml",
26+
{
27+
"crates": [
28+
{
29+
"root_module": "./example/mini_core.rs",
30+
"edition": "2018",
31+
"deps": [],
32+
"cfg": []
33+
},
34+
{
35+
"root_module": "./example/mini_core_hello_world.rs",
36+
"edition": "2018",
37+
"deps": [
38+
{
39+
"crate": 0,
40+
"name": "mini_core"
41+
}
42+
],
43+
"cfg": []
44+
},
45+
{
46+
"root_module": "./example/mod_bench.rs",
47+
"edition": "2018",
48+
"deps": [],
49+
"cfg": []
50+
}
51+
]
52+
},
53+
{
54+
"sysroot_src": "./build/stdlib/library",
55+
"crates": [
56+
{
57+
"root_module": "./example/std_example.rs",
58+
"edition": "2015",
59+
"deps": [],
60+
"cfg": []
61+
}
62+
]
63+
}
64+
]
65+
}
66+
}
67+
}
68+
}

Diff for: compiler/rustc_codegen_cranelift/Cargo.lock

+48-28
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ version = "1.0.86"
2020
source = "registry+https://github.com/rust-lang/crates.io-index"
2121
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
2222

23+
[[package]]
24+
name = "ar_archive_writer"
25+
version = "0.3.3"
26+
source = "registry+https://github.com/rust-lang/crates.io-index"
27+
checksum = "3f2bcb7cf51decfbbfc7ef476e28b0775b13e5eb1190f8b7df145cd53d4f4374"
28+
dependencies = [
29+
"object",
30+
]
31+
2332
[[package]]
2433
name = "arbitrary"
2534
version = "1.3.2"
@@ -46,21 +55,28 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
4655

4756
[[package]]
4857
name = "cranelift-bforest"
49-
version = "0.109.0"
58+
version = "0.110.1"
5059
source = "registry+https://github.com/rust-lang/crates.io-index"
51-
checksum = "0b6b33d7e757a887989eb18b35712b2a67d96171ec3149d1bfb657b29b7b367c"
60+
checksum = "effa84ab2023f7138045ece6b326588c17447ca22e66db71ec15cb0a6c0c4ad2"
5261
dependencies = [
5362
"cranelift-entity",
5463
]
5564

65+
[[package]]
66+
name = "cranelift-bitset"
67+
version = "0.110.1"
68+
source = "registry+https://github.com/rust-lang/crates.io-index"
69+
checksum = "38a1dfc50dca188a15d938867c4400589530bcb0138f7022aae6d059d1d8c309"
70+
5671
[[package]]
5772
name = "cranelift-codegen"
58-
version = "0.109.0"
73+
version = "0.110.1"
5974
source = "registry+https://github.com/rust-lang/crates.io-index"
60-
checksum = "b9acf15cb22be42d07c3b57d7856329cb228b7315d385346149df2566ad5e4aa"
75+
checksum = "821c20c639350158ecca928dc2a244d0d1c9cef2377a378fc62a445a286eb1ca"
6176
dependencies = [
6277
"bumpalo",
6378
"cranelift-bforest",
79+
"cranelift-bitset",
6480
"cranelift-codegen-meta",
6581
"cranelift-codegen-shared",
6682
"cranelift-control",
@@ -77,39 +93,42 @@ dependencies = [
7793

7894
[[package]]
7995
name = "cranelift-codegen-meta"
80-
version = "0.109.0"
96+
version = "0.110.1"
8197
source = "registry+https://github.com/rust-lang/crates.io-index"
82-
checksum = "e934d301392b73b3f8b0540391fb82465a0f179a3cee7c726482ac4727efcc97"
98+
checksum = "064473f2fd59b44fa2c9aaa60de1f9c44db5e13521e28bc85d2b92ee535ef625"
8399
dependencies = [
84100
"cranelift-codegen-shared",
85101
]
86102

87103
[[package]]
88104
name = "cranelift-codegen-shared"
89-
version = "0.109.0"
105+
version = "0.110.1"
90106
source = "registry+https://github.com/rust-lang/crates.io-index"
91-
checksum = "8afb2a2566b3d54b854dfb288b3b187f6d3d17d6f762c92898207eba302931da"
107+
checksum = "d0f39b9ebfd2febdc2acfb9a0fca110665bcd5a6839502576307735ed07b2177"
92108

93109
[[package]]
94110
name = "cranelift-control"
95-
version = "0.109.0"
111+
version = "0.110.1"
96112
source = "registry+https://github.com/rust-lang/crates.io-index"
97-
checksum = "0100f33b704cdacd01ad66ff41f8c5030d57cbff078e2a4e49ab1822591299fa"
113+
checksum = "94e125c189c3a1ca8dfe209fc6f46edba058a6d24e0b92aff69459a15f4711e7"
98114
dependencies = [
99115
"arbitrary",
100116
]
101117

102118
[[package]]
103119
name = "cranelift-entity"
104-
version = "0.109.0"
120+
version = "0.110.1"
105121
source = "registry+https://github.com/rust-lang/crates.io-index"
106-
checksum = "a8cfdc315e5d18997093e040a8d234bea1ac1e118a716d3e30f40d449e78207b"
122+
checksum = "ea62eb109baec2247e1a6fa7b74c0f584b1e76e289cfd7017385b4b031fc8450"
123+
dependencies = [
124+
"cranelift-bitset",
125+
]
107126

108127
[[package]]
109128
name = "cranelift-frontend"
110-
version = "0.109.0"
129+
version = "0.110.1"
111130
source = "registry+https://github.com/rust-lang/crates.io-index"
112-
checksum = "0f74b84f16af2e982b0c0c72233503d9d55cbfe3865dbe807ca28dc6642a28b5"
131+
checksum = "722b089357aacb6c7528b2e59a5fe00917d61ce63448b25a3e477a5b7819fac8"
113132
dependencies = [
114133
"cranelift-codegen",
115134
"log",
@@ -119,15 +138,15 @@ dependencies = [
119138

120139
[[package]]
121140
name = "cranelift-isle"
122-
version = "0.109.0"
141+
version = "0.110.1"
123142
source = "registry+https://github.com/rust-lang/crates.io-index"
124-
checksum = "adf306d3dde705fb94bd48082f01d38c4ededc74293a4c007805f610bf08bc6e"
143+
checksum = "c4b5005a48288e7fc2a2991a377831c534e26929b063c379c018060727785a9b"
125144

126145
[[package]]
127146
name = "cranelift-jit"
128-
version = "0.109.0"
147+
version = "0.110.1"
129148
source = "registry+https://github.com/rust-lang/crates.io-index"
130-
checksum = "f5c5cfb8bbd3339cd25cca30e7516ff8fe5cb1feeddde6980cc4d5ef34df97bb"
149+
checksum = "f843932baf8d1025c5f114b929eda172d74b7163d058e0de2597c308b567c7e9"
131150
dependencies = [
132151
"anyhow",
133152
"cranelift-codegen",
@@ -145,9 +164,9 @@ dependencies = [
145164

146165
[[package]]
147166
name = "cranelift-module"
148-
version = "0.109.0"
167+
version = "0.110.1"
149168
source = "registry+https://github.com/rust-lang/crates.io-index"
150-
checksum = "7c9b0d4269b36fd858e6d8f20cd4938941186fb831488c361888cb2d6b33a9a6"
169+
checksum = "449819ef1c4af139cf1b9717916fcaea0e23248853d3e95135139773a842d3eb"
151170
dependencies = [
152171
"anyhow",
153172
"cranelift-codegen",
@@ -156,9 +175,9 @@ dependencies = [
156175

157176
[[package]]
158177
name = "cranelift-native"
159-
version = "0.109.0"
178+
version = "0.110.1"
160179
source = "registry+https://github.com/rust-lang/crates.io-index"
161-
checksum = "1ea0ebdef7aff4a79bcbc8b6495f31315f16b3bf311152f472eaa8d679352581"
180+
checksum = "3ae2d48f38081a9e679ad795bd36bb29bedeb5552fc1c195185bf9885fa1b16e"
162181
dependencies = [
163182
"cranelift-codegen",
164183
"libc",
@@ -167,9 +186,9 @@ dependencies = [
167186

168187
[[package]]
169188
name = "cranelift-object"
170-
version = "0.109.0"
189+
version = "0.110.1"
171190
source = "registry+https://github.com/rust-lang/crates.io-index"
172-
checksum = "19e33439ec20db058bc7cc3410f9748ab1ad90a35cef713d625c736f43e3820d"
191+
checksum = "3a39ee2cfd0ec485eca76f6b4dc17701a280fa406bc05137bb43f1635ed12c9f"
173192
dependencies = [
174193
"anyhow",
175194
"cranelift-codegen",
@@ -279,9 +298,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
279298

280299
[[package]]
281300
name = "object"
282-
version = "0.36.1"
301+
version = "0.36.2"
283302
source = "registry+https://github.com/rust-lang/crates.io-index"
284-
checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce"
303+
checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e"
285304
dependencies = [
286305
"crc32fast",
287306
"hashbrown 0.14.5",
@@ -348,6 +367,7 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
348367
name = "rustc_codegen_cranelift"
349368
version = "0.1.0"
350369
dependencies = [
370+
"ar_archive_writer",
351371
"cranelift-codegen",
352372
"cranelift-frontend",
353373
"cranelift-jit",
@@ -411,9 +431,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
411431

412432
[[package]]
413433
name = "wasmtime-jit-icache-coherence"
414-
version = "22.0.0"
434+
version = "23.0.1"
415435
source = "registry+https://github.com/rust-lang/crates.io-index"
416-
checksum = "5afe2f0499542f9a4bcfa1b55bfdda803b6ade4e7c93c6b99e0f39dba44b0a91"
436+
checksum = "7fddf3e2980fb1d123d1fcac55189e417fdd3dba4f62139b5a0a1f9efe5669d5"
417437
dependencies = [
418438
"anyhow",
419439
"cfg-if",

Diff for: compiler/rustc_codegen_cranelift/Cargo.toml

+7-6
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.109.0", default-features = false, features = ["std", "unwind", "all-arch"] }
12-
cranelift-frontend = { version = "0.109.0" }
13-
cranelift-module = { version = "0.109.0" }
14-
cranelift-native = { version = "0.109.0" }
15-
cranelift-jit = { version = "0.109.0", optional = true }
16-
cranelift-object = { version = "0.109.0" }
11+
cranelift-codegen = { version = "0.110.1", default-features = false, features = ["std", "unwind", "all-arch"] }
12+
cranelift-frontend = { version = "0.110.1" }
13+
cranelift-module = { version = "0.110.1" }
14+
cranelift-native = { version = "0.110.1" }
15+
cranelift-jit = { version = "0.110.1", optional = true }
16+
cranelift-object = { version = "0.110.1" }
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.28", default-features = false, features = ["write"]}
1919
object = { version = "0.36", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
20+
ar_archive_writer = "0.3"
2021

2122
indexmap = "2.0.0"
2223
libloading = { version = "0.8.0", optional = true }

Diff for: compiler/rustc_codegen_cranelift/Readme.md

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ $ rustup component add rustc-codegen-cranelift-preview --toolchain nightly
1616

1717
Once it is installed, you can enable it with one of the following approaches:
1818
- `CARGO_PROFILE_DEV_CODEGEN_BACKEND=cranelift cargo +nightly build -Zcodegen-backend`
19-
- `RUSTFLAGS="-Zcodegen-backend=cranelift" cargo +nightly build`
2019
- Add the following to `.cargo/config.toml`:
2120
```toml
2221
[unstable]

0 commit comments

Comments
 (0)