Skip to content

Commit 9a87fb4

Browse files
authored
Rollup merge of #100964 - bjorn3:sync_cg_clif-2022-08-24, r=bjorn3
Sync rustc_codegen_cranelift The main highlights this time are support for parallel compilation of codegen units (by me) and improved windows support (by `@afonso360)` In addition `@afonso360` added abi-checker to cg_clif's CI. This has already catched an abi compatibility issue with AArch64. The fix has landed on Cranelift's main branch, but doesn't yet have a release. `@uweigand` also submitted a couple of PR's that will are prerequisites for supporting IBM's s390x architecture. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2 parents 688bdbd + e62e1d4 commit 9a87fb4

Some content is hidden

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

47 files changed

+2299
-1259
lines changed

compiler/rustc_codegen_cranelift/.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ task:
2222
- # Reduce amount of benchmark runs as they are slow
2323
- export COMPILE_RUNS=2
2424
- export RUN_RUNS=2
25-
- ./test.sh
25+
- ./y.rs test

compiler/rustc_codegen_cranelift/.github/workflows/main.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
# Enable extra checks
104104
export CG_CLIF_ENABLE_VERIFIER=1
105105
106-
./test.sh
106+
./y.rs test
107107
108108
- name: Package prebuilt cg_clif
109109
run: tar cvfJ cg_clif.tar.xz build
@@ -162,14 +162,14 @@ jobs:
162162
#name: Test
163163
run: |
164164
# Enable backtraces for easier debugging
165-
#export RUST_BACKTRACE=1
165+
#$Env:RUST_BACKTRACE=1
166166
167167
# Reduce amount of benchmark runs as they are slow
168-
#export COMPILE_RUNS=2
169-
#export RUN_RUNS=2
168+
#$Env:COMPILE_RUNS=2
169+
#$Env:RUN_RUNS=2
170170
171171
# Enable extra checks
172-
#export CG_CLIF_ENABLE_VERIFIER=1
172+
#$Env:CG_CLIF_ENABLE_VERIFIER=1
173173
174174
./y.exe build
175175

compiler/rustc_codegen_cranelift/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ perf.data.old
88
*.string*
99
/y.bin
1010
/y.bin.dSYM
11+
/y.exe
12+
/y.pdb
1113
/build
1214
/build_sysroot/sysroot_src
1315
/build_sysroot/compiler-builtins
@@ -17,3 +19,4 @@ perf.data.old
1719
/regex
1820
/simple-raytracer
1921
/portable-simd
22+
/abi-checker

compiler/rustc_codegen_cranelift/Cargo.lock

+92-55
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
5050

5151
[[package]]
5252
name = "cranelift-bforest"
53-
version = "0.85.3"
53+
version = "0.87.0"
5454
source = "registry+https://github.com/rust-lang/crates.io-index"
55-
checksum = "749d0d6022c9038dccf480bdde2a38d435937335bf2bb0f14e815d94517cdce8"
55+
checksum = "93945adbccc8d731503d3038814a51e8317497c9e205411820348132fa01a358"
5656
dependencies = [
5757
"cranelift-entity",
5858
]
5959

6060
[[package]]
6161
name = "cranelift-codegen"
62-
version = "0.85.3"
62+
version = "0.87.0"
6363
source = "registry+https://github.com/rust-lang/crates.io-index"
64-
checksum = "e94370cc7b37bf652ccd8bb8f09bd900997f7ccf97520edfc75554bb5c4abbea"
64+
checksum = "2b482acc9d0d0d1ad3288a90a8150ee648be3dce8dc8c8669ff026f72debdc31"
6565
dependencies = [
6666
"cranelift-bforest",
6767
"cranelift-codegen-meta",
@@ -77,30 +77,30 @@ dependencies = [
7777

7878
[[package]]
7979
name = "cranelift-codegen-meta"
80-
version = "0.85.3"
80+
version = "0.87.0"
8181
source = "registry+https://github.com/rust-lang/crates.io-index"
82-
checksum = "e0a3cea8fdab90e44018c5b9a1dfd460d8ee265ac354337150222a354628bdb6"
82+
checksum = "f9ec188d71e663192ef9048f204e410a7283b609942efc9fcc77da6d496edbb8"
8383
dependencies = [
8484
"cranelift-codegen-shared",
8585
]
8686

8787
[[package]]
8888
name = "cranelift-codegen-shared"
89-
version = "0.85.3"
89+
version = "0.87.0"
9090
source = "registry+https://github.com/rust-lang/crates.io-index"
91-
checksum = "5ac72f76f2698598951ab26d8c96eaa854810e693e7dd52523958b5909fde6b2"
91+
checksum = "3ad794b1b1c2c7bd9f7b76cfe0f084eaf7753e55d56191c3f7d89e8fa4978b99"
9292

9393
[[package]]
9494
name = "cranelift-entity"
95-
version = "0.85.3"
95+
version = "0.87.0"
9696
source = "registry+https://github.com/rust-lang/crates.io-index"
97-
checksum = "09eaeacfcd2356fe0e66b295e8f9d59fdd1ac3ace53ba50de14d628ec902f72d"
97+
checksum = "342da0d5056f4119d3c311c4aab2460ceb6ee6e127bb395b76dd2279a09ea7a5"
9898

9999
[[package]]
100100
name = "cranelift-frontend"
101-
version = "0.85.3"
101+
version = "0.87.0"
102102
source = "registry+https://github.com/rust-lang/crates.io-index"
103-
checksum = "dba69c9980d5ffd62c18a2bde927855fcd7c8dc92f29feaf8636052662cbd99c"
103+
checksum = "dfff792f775b07d4d9cfe9f1c767ce755c6cbadda1bbd6db18a1c75ff9f7376a"
104104
dependencies = [
105105
"cranelift-codegen",
106106
"log",
@@ -110,15 +110,15 @@ dependencies = [
110110

111111
[[package]]
112112
name = "cranelift-isle"
113-
version = "0.85.3"
113+
version = "0.87.0"
114114
source = "registry+https://github.com/rust-lang/crates.io-index"
115-
checksum = "d2920dc1e05cac40304456ed3301fde2c09bd6a9b0210bcfa2f101398d628d5b"
115+
checksum = "8d51089478849f2ac8ef60a8a2d5346c8d4abfec0e45ac5b24530ef9f9499e1e"
116116

117117
[[package]]
118118
name = "cranelift-jit"
119-
version = "0.85.3"
119+
version = "0.87.0"
120120
source = "registry+https://github.com/rust-lang/crates.io-index"
121-
checksum = "1c3c5ed067f2c81577e431f3039148a9c187b33cc79e0d1731fede27d801ec56"
121+
checksum = "095936e41720f86004b4c57ce88e6a13af28646bb3a6fb4afbebd5ae90c50029"
122122
dependencies = [
123123
"anyhow",
124124
"cranelift-codegen",
@@ -129,24 +129,24 @@ dependencies = [
129129
"log",
130130
"region",
131131
"target-lexicon",
132-
"winapi",
132+
"windows-sys",
133133
]
134134

135135
[[package]]
136136
name = "cranelift-module"
137-
version = "0.85.3"
137+
version = "0.87.0"
138138
source = "registry+https://github.com/rust-lang/crates.io-index"
139-
checksum = "eee6784303bf9af235237a4885f7417e09a35df896d38ea969a0081064b3ede4"
139+
checksum = "704a1aea4723d97eafe0fb7af110f6f6868b1ac95f5380bbc9adb2a3b8cf97e8"
140140
dependencies = [
141141
"anyhow",
142142
"cranelift-codegen",
143143
]
144144

145145
[[package]]
146146
name = "cranelift-native"
147-
version = "0.85.3"
147+
version = "0.87.0"
148148
source = "registry+https://github.com/rust-lang/crates.io-index"
149-
checksum = "f04dfa45f9b2a6f587c564d6b63388e00cd6589d2df6ea2758cf79e1a13285e6"
149+
checksum = "885debe62f2078638d6585f54c9f05f5c2008f22ce5a2a9100ada785fc065dbd"
150150
dependencies = [
151151
"cranelift-codegen",
152152
"libc",
@@ -155,9 +155,9 @@ dependencies = [
155155

156156
[[package]]
157157
name = "cranelift-object"
158-
version = "0.85.3"
158+
version = "0.87.0"
159159
source = "registry+https://github.com/rust-lang/crates.io-index"
160-
checksum = "0bf38b2c505db749276793116c0cb30bd096206c7810e471677a453134881881"
160+
checksum = "aac1310cf1081ae8eca916c92cd163b977c77cab6e831fa812273c26ff921816"
161161
dependencies = [
162162
"anyhow",
163163
"cranelift-codegen",
@@ -187,9 +187,9 @@ dependencies = [
187187

188188
[[package]]
189189
name = "getrandom"
190-
version = "0.2.6"
190+
version = "0.2.7"
191191
source = "registry+https://github.com/rust-lang/crates.io-index"
192-
checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
192+
checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
193193
dependencies = [
194194
"cfg-if",
195195
"libc",
@@ -198,43 +198,37 @@ dependencies = [
198198

199199
[[package]]
200200
name = "gimli"
201-
version = "0.26.1"
201+
version = "0.26.2"
202202
source = "registry+https://github.com/rust-lang/crates.io-index"
203-
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
203+
checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
204204
dependencies = [
205205
"indexmap",
206206
]
207207

208208
[[package]]
209209
name = "hashbrown"
210-
version = "0.11.2"
210+
version = "0.12.3"
211211
source = "registry+https://github.com/rust-lang/crates.io-index"
212-
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
212+
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
213213
dependencies = [
214214
"ahash",
215215
]
216216

217-
[[package]]
218-
name = "hashbrown"
219-
version = "0.12.3"
220-
source = "registry+https://github.com/rust-lang/crates.io-index"
221-
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
222-
223217
[[package]]
224218
name = "indexmap"
225219
version = "1.9.1"
226220
source = "registry+https://github.com/rust-lang/crates.io-index"
227221
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
228222
dependencies = [
229223
"autocfg",
230-
"hashbrown 0.12.3",
224+
"hashbrown",
231225
]
232226

233227
[[package]]
234228
name = "libc"
235-
version = "0.2.126"
229+
version = "0.2.127"
236230
source = "registry+https://github.com/rust-lang/crates.io-index"
237-
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
231+
checksum = "505e71a4706fa491e9b1b55f51b95d4037d0821ee40131190475f692b35b009b"
238232

239233
[[package]]
240234
name = "libloading"
@@ -248,9 +242,9 @@ dependencies = [
248242

249243
[[package]]
250244
name = "log"
251-
version = "0.4.14"
245+
version = "0.4.17"
252246
source = "registry+https://github.com/rust-lang/crates.io-index"
253-
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
247+
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
254248
dependencies = [
255249
"cfg-if",
256250
]
@@ -266,33 +260,33 @@ dependencies = [
266260

267261
[[package]]
268262
name = "memchr"
269-
version = "2.4.1"
263+
version = "2.5.0"
270264
source = "registry+https://github.com/rust-lang/crates.io-index"
271-
checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
265+
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
272266

273267
[[package]]
274268
name = "object"
275-
version = "0.28.4"
269+
version = "0.29.0"
276270
source = "registry+https://github.com/rust-lang/crates.io-index"
277-
checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424"
271+
checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
278272
dependencies = [
279273
"crc32fast",
280-
"hashbrown 0.11.2",
274+
"hashbrown",
281275
"indexmap",
282276
"memchr",
283277
]
284278

285279
[[package]]
286280
name = "once_cell"
287-
version = "1.10.0"
281+
version = "1.13.0"
288282
source = "registry+https://github.com/rust-lang/crates.io-index"
289-
checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
283+
checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
290284

291285
[[package]]
292286
name = "regalloc2"
293-
version = "0.2.3"
287+
version = "0.3.2"
294288
source = "registry+https://github.com/rust-lang/crates.io-index"
295-
checksum = "4a8d23b35d7177df3b9d31ed8a9ab4bf625c668be77a319d4f5efd4a5257701c"
289+
checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779"
296290
dependencies = [
297291
"fxhash",
298292
"log",
@@ -340,15 +334,15 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec"
340334

341335
[[package]]
342336
name = "smallvec"
343-
version = "1.8.1"
337+
version = "1.9.0"
344338
source = "registry+https://github.com/rust-lang/crates.io-index"
345-
checksum = "cc88c725d61fc6c3132893370cac4a0200e3fedf5da8331c570664b1987f5ca2"
339+
checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"
346340

347341
[[package]]
348342
name = "target-lexicon"
349-
version = "0.12.3"
343+
version = "0.12.4"
350344
source = "registry+https://github.com/rust-lang/crates.io-index"
351-
checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1"
345+
checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1"
352346

353347
[[package]]
354348
name = "version_check"
@@ -358,9 +352,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
358352

359353
[[package]]
360354
name = "wasi"
361-
version = "0.10.2+wasi-snapshot-preview1"
355+
version = "0.11.0+wasi-snapshot-preview1"
362356
source = "registry+https://github.com/rust-lang/crates.io-index"
363-
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
357+
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
364358

365359
[[package]]
366360
name = "winapi"
@@ -383,3 +377,46 @@ name = "winapi-x86_64-pc-windows-gnu"
383377
version = "0.4.0"
384378
source = "registry+https://github.com/rust-lang/crates.io-index"
385379
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
380+
381+
[[package]]
382+
name = "windows-sys"
383+
version = "0.36.1"
384+
source = "registry+https://github.com/rust-lang/crates.io-index"
385+
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
386+
dependencies = [
387+
"windows_aarch64_msvc",
388+
"windows_i686_gnu",
389+
"windows_i686_msvc",
390+
"windows_x86_64_gnu",
391+
"windows_x86_64_msvc",
392+
]
393+
394+
[[package]]
395+
name = "windows_aarch64_msvc"
396+
version = "0.36.1"
397+
source = "registry+https://github.com/rust-lang/crates.io-index"
398+
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
399+
400+
[[package]]
401+
name = "windows_i686_gnu"
402+
version = "0.36.1"
403+
source = "registry+https://github.com/rust-lang/crates.io-index"
404+
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
405+
406+
[[package]]
407+
name = "windows_i686_msvc"
408+
version = "0.36.1"
409+
source = "registry+https://github.com/rust-lang/crates.io-index"
410+
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
411+
412+
[[package]]
413+
name = "windows_x86_64_gnu"
414+
version = "0.36.1"
415+
source = "registry+https://github.com/rust-lang/crates.io-index"
416+
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
417+
418+
[[package]]
419+
name = "windows_x86_64_msvc"
420+
version = "0.36.1"
421+
source = "registry+https://github.com/rust-lang/crates.io-index"
422+
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"

compiler/rustc_codegen_cranelift/Cargo.toml

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

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.85.3", features = ["unwind", "all-arch"] }
12-
cranelift-frontend = "0.85.3"
13-
cranelift-module = "0.85.3"
14-
cranelift-native = "0.85.3"
15-
cranelift-jit = { version = "0.85.3", optional = true }
16-
cranelift-object = "0.85.3"
11+
cranelift-codegen = { version = "0.87.0", features = ["unwind", "all-arch"] }
12+
cranelift-frontend = "0.87.0"
13+
cranelift-module = "0.87.0"
14+
cranelift-native = "0.87.0"
15+
cranelift-jit = { version = "0.87.0", optional = true }
16+
cranelift-object = "0.87.0"
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.26.0", default-features = false, features = ["write"]}
19-
object = { version = "0.28.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
19+
object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
2020

2121
ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" }
2222
indexmap = "1.9.1"

0 commit comments

Comments
 (0)