Skip to content

Commit e37f25a

Browse files
committed
Auto merge of #79507 - jonas-schievink:rollup-e5yeayh, r=jonas-schievink
Rollup of 10 pull requests Successful merges: - #78086 (Improve doc for 'as _') - #78853 (rustc_parse: fix ConstBlock expr span) - #79234 (Resolve typedefs in HashMap gdb/lldb pretty-printers) - #79344 (Convert UNC path to local path to satisfy install script on Windows) - #79383 (Fix bold code formatting in keyword docs) - #79460 (Remove intermediate vectors from `add_bounds`) - #79474 (Change comments on types to doc-comments) - #79476 (Sync rustc_codegen_cranelift) - #79478 (Expand docs on Peekable::peek_mut) - #79486 (Slightly improve code samples in E0591) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4ae328b + 208d680 commit e37f25a

File tree

43 files changed

+471
-268
lines changed

Some content is hidden

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

43 files changed

+471
-268
lines changed

Diff for: compiler/rustc_codegen_cranelift/.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* text=auto eol=lf
2+
*.rs diff=rust

Diff for: compiler/rustc_codegen_cranelift/Cargo.lock

+55-49
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# It is not intended for manual editing.
33
[[package]]
44
name = "anyhow"
5-
version = "1.0.33"
5+
version = "1.0.34"
66
source = "registry+https://github.com/rust-lang/crates.io-index"
7-
checksum = "a1fd36ffbb1fb7c834eac128ea8d0e310c5aeb635548f9d58861e1308d46e71c"
7+
checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7"
88

99
[[package]]
1010
name = "ar"
@@ -31,28 +31,34 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
3131

3232
[[package]]
3333
name = "cc"
34-
version = "1.0.61"
34+
version = "1.0.62"
3535
source = "registry+https://github.com/rust-lang/crates.io-index"
36-
checksum = "ed67cbde08356238e75fc4656be4749481eeffb09e19f320a25237d5221c985d"
36+
checksum = "f1770ced377336a88a67c473594ccc14eca6f4559217c34f64aac8f83d641b40"
3737

3838
[[package]]
3939
name = "cfg-if"
4040
version = "0.1.10"
4141
source = "registry+https://github.com/rust-lang/crates.io-index"
4242
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
4343

44+
[[package]]
45+
name = "cfg-if"
46+
version = "1.0.0"
47+
source = "registry+https://github.com/rust-lang/crates.io-index"
48+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
49+
4450
[[package]]
4551
name = "cranelift-bforest"
46-
version = "0.67.0"
47-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
52+
version = "0.68.0"
53+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
4854
dependencies = [
4955
"cranelift-entity",
5056
]
5157

5258
[[package]]
5359
name = "cranelift-codegen"
54-
version = "0.67.0"
55-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
60+
version = "0.68.0"
61+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
5662
dependencies = [
5763
"byteorder",
5864
"cranelift-bforest",
@@ -69,27 +75,27 @@ dependencies = [
6975

7076
[[package]]
7177
name = "cranelift-codegen-meta"
72-
version = "0.67.0"
73-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
78+
version = "0.68.0"
79+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
7480
dependencies = [
7581
"cranelift-codegen-shared",
7682
"cranelift-entity",
7783
]
7884

7985
[[package]]
8086
name = "cranelift-codegen-shared"
81-
version = "0.67.0"
82-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
87+
version = "0.68.0"
88+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
8389

8490
[[package]]
8591
name = "cranelift-entity"
86-
version = "0.67.0"
87-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
92+
version = "0.68.0"
93+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
8894

8995
[[package]]
9096
name = "cranelift-frontend"
91-
version = "0.67.0"
92-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
97+
version = "0.68.0"
98+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
9399
dependencies = [
94100
"cranelift-codegen",
95101
"log",
@@ -99,8 +105,8 @@ dependencies = [
99105

100106
[[package]]
101107
name = "cranelift-module"
102-
version = "0.67.0"
103-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
108+
version = "0.68.0"
109+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
104110
dependencies = [
105111
"anyhow",
106112
"cranelift-codegen",
@@ -111,8 +117,8 @@ dependencies = [
111117

112118
[[package]]
113119
name = "cranelift-native"
114-
version = "0.67.0"
115-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
120+
version = "0.68.0"
121+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
116122
dependencies = [
117123
"cranelift-codegen",
118124
"raw-cpuid",
@@ -121,8 +127,8 @@ dependencies = [
121127

122128
[[package]]
123129
name = "cranelift-object"
124-
version = "0.67.0"
125-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
130+
version = "0.68.0"
131+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
126132
dependencies = [
127133
"anyhow",
128134
"cranelift-codegen",
@@ -134,8 +140,8 @@ dependencies = [
134140

135141
[[package]]
136142
name = "cranelift-simplejit"
137-
version = "0.67.0"
138-
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
143+
version = "0.68.0"
144+
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
139145
dependencies = [
140146
"cranelift-codegen",
141147
"cranelift-entity",
@@ -151,18 +157,18 @@ dependencies = [
151157

152158
[[package]]
153159
name = "crc32fast"
154-
version = "1.2.0"
160+
version = "1.2.1"
155161
source = "registry+https://github.com/rust-lang/crates.io-index"
156-
checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
162+
checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
157163
dependencies = [
158-
"cfg-if",
164+
"cfg-if 1.0.0",
159165
]
160166

161167
[[package]]
162168
name = "errno"
163-
version = "0.2.6"
169+
version = "0.2.7"
164170
source = "registry+https://github.com/rust-lang/crates.io-index"
165-
checksum = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01"
171+
checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe"
166172
dependencies = [
167173
"errno-dragonfly",
168174
"libc",
@@ -187,9 +193,9 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
187193

188194
[[package]]
189195
name = "gimli"
190-
version = "0.22.0"
196+
version = "0.23.0"
191197
source = "registry+https://github.com/rust-lang/crates.io-index"
192-
checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724"
198+
checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
193199
dependencies = [
194200
"indexmap",
195201
]
@@ -212,17 +218,17 @@ dependencies = [
212218

213219
[[package]]
214220
name = "libc"
215-
version = "0.2.79"
221+
version = "0.2.80"
216222
source = "registry+https://github.com/rust-lang/crates.io-index"
217-
checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743"
223+
checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"
218224

219225
[[package]]
220226
name = "libloading"
221-
version = "0.6.4"
227+
version = "0.6.5"
222228
source = "registry+https://github.com/rust-lang/crates.io-index"
223-
checksum = "3557c9384f7f757f6d139cd3a4c62ef4e850696c16bf27924a5538c8a09717a1"
229+
checksum = "1090080fe06ec2648d0da3881d9453d97e71a45f00eb179af7fdd7e3f686fdb0"
224230
dependencies = [
225-
"cfg-if",
231+
"cfg-if 1.0.0",
226232
"winapi",
227233
]
228234

@@ -232,7 +238,7 @@ version = "0.4.11"
232238
source = "registry+https://github.com/rust-lang/crates.io-index"
233239
checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
234240
dependencies = [
235-
"cfg-if",
241+
"cfg-if 0.1.10",
236242
]
237243

238244
[[package]]
@@ -246,9 +252,9 @@ dependencies = [
246252

247253
[[package]]
248254
name = "object"
249-
version = "0.21.1"
255+
version = "0.22.0"
250256
source = "registry+https://github.com/rust-lang/crates.io-index"
251-
checksum = "37fd5004feb2ce328a52b0b3d01dbf4ffff72583493900ed15f22d4111c51693"
257+
checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397"
252258
dependencies = [
253259
"crc32fast",
254260
"indexmap",
@@ -274,9 +280,9 @@ dependencies = [
274280

275281
[[package]]
276282
name = "raw-cpuid"
277-
version = "7.0.3"
283+
version = "8.1.2"
278284
source = "registry+https://github.com/rust-lang/crates.io-index"
279-
checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf"
285+
checksum = "1fdf7d9dbd43f3d81d94a49c1c3df73cc2b3827995147e6cf7f89d4ec5483e73"
280286
dependencies = [
281287
"bitflags",
282288
"cc",
@@ -361,9 +367,9 @@ checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252"
361367

362368
[[package]]
363369
name = "syn"
364-
version = "1.0.44"
370+
version = "1.0.48"
365371
source = "registry+https://github.com/rust-lang/crates.io-index"
366-
checksum = "e03e57e4fcbfe7749842d53e24ccb9aa12b7252dbe5e91d2acad31834c8b8fdd"
372+
checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac"
367373
dependencies = [
368374
"proc-macro2",
369375
"quote",
@@ -372,24 +378,24 @@ dependencies = [
372378

373379
[[package]]
374380
name = "target-lexicon"
375-
version = "0.11.0"
381+
version = "0.11.1"
376382
source = "registry+https://github.com/rust-lang/crates.io-index"
377-
checksum = "fe2635952a442a01fd4cb53d98858b5e4bb461b02c0d111f22f31772e3e7a8b2"
383+
checksum = "4ee5a98e506fb7231a304c3a1bd7c132a55016cf65001e0282480665870dfcb9"
378384

379385
[[package]]
380386
name = "thiserror"
381-
version = "1.0.21"
387+
version = "1.0.22"
382388
source = "registry+https://github.com/rust-lang/crates.io-index"
383-
checksum = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42"
389+
checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e"
384390
dependencies = [
385391
"thiserror-impl",
386392
]
387393

388394
[[package]]
389395
name = "thiserror-impl"
390-
version = "1.0.21"
396+
version = "1.0.22"
391397
source = "registry+https://github.com/rust-lang/crates.io-index"
392-
checksum = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab"
398+
checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56"
393399
dependencies = [
394400
"proc-macro2",
395401
"quote",

Diff for: compiler/rustc_codegen_cranelift/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime/", bran
1515
cranelift-simplejit = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", optional = true }
1616
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
1717
target-lexicon = "0.11.0"
18-
gimli = { version = "0.22.0", default-features = false, features = ["write"]}
19-
object = { version = "0.21.1", default-features = false, features = ["std", "read_core", "write", "coff", "elf", "macho", "pe"] }
18+
gimli = { version = "0.23.0", default-features = false, features = ["write"]}
19+
object = { version = "0.22.0", default-features = false, features = ["std", "read_core", "write", "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.0.2"

Diff for: compiler/rustc_codegen_cranelift/Readme.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This should build and run your project with rustc_codegen_cranelift instead of t
5151
> You should prefer using the Cargo method.
5252
5353
```bash
54-
$ $cg_clif_dir/build/cg_clif my_crate.rs
54+
$ $cg_clif_dir/build/bin/cg_clif my_crate.rs
5555
```
5656

5757
### Jit mode
@@ -68,7 +68,7 @@ $ $cg_clif_dir/build/cargo.sh jit
6868
or
6969

7070
```bash
71-
$ $cg_clif_dir/build/cg_clif --jit my_crate.rs
71+
$ $cg_clif_dir/build/bin/cg_clif --jit my_crate.rs
7272
```
7373

7474
### Shell
@@ -77,7 +77,7 @@ These are a few functions that allow you to easily run rust code from the shell
7777

7878
```bash
7979
function jit_naked() {
80-
echo "$@" | $cg_clif_dir/build/cg_clif - --jit
80+
echo "$@" | $cg_clif_dir/build/bin/cg_clif - --jit
8181
}
8282

8383
function jit() {

Diff for: compiler/rustc_codegen_cranelift/build.sh

+19-6
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,35 @@ while [[ $# != 0 ]]; do
2626
done
2727

2828
# Build cg_clif
29+
unset CARGO_TARGET_DIR
2930
export RUSTFLAGS="-Zrun_dsymutil=no"
31+
unamestr=$(uname)
32+
if [[ "$unamestr" == 'Linux' ]]; then
33+
export RUSTFLAGS='-Clink-arg=-Wl,-rpath=$ORIGIN/../lib '$RUSTFLAGS
34+
elif [[ "$unamestr" == 'Darwin' ]]; then
35+
export RUSTFLAGS='-Clink-arg=-Wl,-rpath,@loader_path/../lib -Zosx-rpath-install-name '$RUSTFLAGS
36+
dylib_ext='dylib'
37+
else
38+
echo "Unsupported os"
39+
exit 1
40+
fi
3041
if [[ "$CHANNEL" == "release" ]]; then
3142
cargo build --release
3243
else
3344
cargo build
3445
fi
3546

36-
rm -rf $target_dir
37-
mkdir $target_dir
38-
cp -a target/$CHANNEL/cg_clif{,_build_sysroot} target/$CHANNEL/*rustc_codegen_cranelift* $target_dir/
39-
cp -a rust-toolchain scripts/config.sh scripts/cargo.sh $target_dir
47+
rm -rf "$target_dir"
48+
mkdir "$target_dir"
49+
mkdir "$target_dir"/bin "$target_dir"/lib
50+
ln target/$CHANNEL/cg_clif{,_build_sysroot} "$target_dir"/bin
51+
ln target/$CHANNEL/*rustc_codegen_cranelift* "$target_dir"/lib
52+
ln rust-toolchain scripts/config.sh scripts/cargo.sh "$target_dir"
4053

4154
if [[ "$build_sysroot" == "1" ]]; then
4255
echo "[BUILD] sysroot"
4356
export CG_CLIF_INCR_CACHE_DISABLED=1
4457
dir=$(pwd)
45-
cd $target_dir
46-
time $dir/build_sysroot/build_sysroot.sh
58+
cd "$target_dir"
59+
time "$dir/build_sysroot/build_sysroot.sh"
4760
fi

0 commit comments

Comments
 (0)