Skip to content

Subtree sync for rustc_codegen_cranelift #141557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 96 commits into from
May 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
c56c2b7
Rename `is_like_osx` to `is_like_darwin`
madsmtm Aug 19, 2024
15dbafa
Merge commit 'ba315abda789c9f59f2100102232bddb30b0d3d3' into sync_cg_…
bjorn3 Mar 30, 2025
4a49ff0
Merge branch 'sync_from_rust'
bjorn3 Mar 30, 2025
625b800
Allow formatting example/gen_block_iterate.rs
bjorn3 Apr 1, 2025
e58dd25
Unset RUSTC_WRAPPER in cg_clif's build system
bjorn3 Mar 31, 2025
bb2b3d0
Run coretests and alloctests with cg_clif in CI
bjorn3 Apr 1, 2025
e3a8d9c
Fix testing with randomized layouts enabled
bjorn3 Apr 3, 2025
d7a6a71
Rollup merge of #138949 - madsmtm:rename-to-darwin, r=WaffleLapkin
matthiaskrgr Apr 4, 2025
43f4232
Sync from rust 00095b3da4f23d9b3e7a809ac6a4e2b2530df84c
bjorn3 Apr 4, 2025
4807c29
Rustup to rustc 1.88.0-nightly (00095b3da 2025-04-03)
bjorn3 Apr 4, 2025
b0c23f7
Fix rustc test suite
bjorn3 Apr 4, 2025
829413d
Tell rustfmt to use the 2024 edition
bjorn3 Apr 4, 2025
0700696
Auto merge of #139213 - bjorn3:cg_clif_test_coretests, r=jieyouxu
bors Apr 4, 2025
4a8026c
update docs
Skgland Apr 6, 2025
6b06289
Sync from rust 2fa8b11f0933dae9b4e5d287cc10c989218e8b36
bjorn3 Apr 7, 2025
25f263d
Rustup to rustc 1.88.0-nightly (2fa8b11f0 2025-04-06)
bjorn3 Apr 7, 2025
0e9a854
Preserve rustc_literal_escaper with --sysroot llvm
bjorn3 Apr 7, 2025
ab84fe6
Simplify temp path creation a bit
compiler-errors Apr 6, 2025
68dd8b3
Prepend temp files with a string per invocation of rustc
compiler-errors Apr 6, 2025
44bbe63
Sync from rust e643f59f6da3a84f43e75dea99afaa5b041ea6bf
bjorn3 Apr 8, 2025
b69a478
Rustup to rustc 1.88.0-nightly (e643f59f6 2025-04-07)
bjorn3 Apr 8, 2025
6424f0a
Replace trap_unimplemented calls with codegen_panic_nounwind
bjorn3 Apr 8, 2025
91c9660
Merge pull request #1568 from rust-lang/better_unsupported_intrinsic_…
bjorn3 Apr 8, 2025
420e44f
Reduce visibility of a couple of functions
bjorn3 Apr 8, 2025
ab514c9
Pass UnwindAction to a couple of functions
bjorn3 Apr 9, 2025
9495eb5
Pass Module to UnwindContext
bjorn3 Apr 9, 2025
547a310
Rename some `name` variables as `ident`.
nnethercote Apr 8, 2025
180bc6c
Remove the use of Rayon iterators
Zoxc Mar 26, 2025
cd8a1ad
Auto merge of #139011 - Zoxc:no-rayon-iters, r=oli-obk
bors Apr 11, 2025
322bba0
Auto merge of #139453 - compiler-errors:incr, r=jieyouxu
bors Apr 11, 2025
bc9dacd
Move `has_self` field to `hir::AssocKind::Fn`.
nnethercote Apr 10, 2025
62c72fc
Sync from rust 092a284ba0421695f2032c947765429fd7095796
bjorn3 Apr 14, 2025
f99bdfe
Rustup to rustc 1.88.0-nightly (092a284ba 2025-04-13)
bjorn3 Apr 14, 2025
1afce7c
Implement simd_insert_dyn and simd_extract_dyn intrinsics
bjorn3 Apr 14, 2025
c02e496
Use cg_ssa's version of codegen_naked_asm in cg_clif
bjorn3 Dec 12, 2024
b3b1edd
Share part of the global_asm!() implementation between cg_ssa and cg_…
bjorn3 Dec 13, 2024
c8c8742
Nicer formatting for verifier errors during define_function
bjorn3 Apr 15, 2025
49bfa1a
Fix simd_insert_dyn and simd_extract_dyn intrinsics with non-pointer …
bjorn3 Apr 18, 2025
59c5ed0
Make `#[naked]` an unsafe attribute
folkertdev Mar 29, 2025
88ddf9e
stabilize `naked_functions`
folkertdev Dec 18, 2024
d50c769
make abi_unsupported_vector_types a hard error
RalfJung Apr 3, 2025
934931b
Sync from rust b8c54d6358926028ac2fab1ec2b8665c70edb1c0
bjorn3 Apr 21, 2025
4cfecfd
Rustup to rustc 1.88.0-nightly (b8c54d635 2025-04-20)
bjorn3 Apr 21, 2025
91114bd
Fix rustc test suite
bjorn3 Apr 21, 2025
de372d3
Update to Cranelift 0.119
bjorn3 Apr 7, 2025
0103c58
support `-Zmin-function-alignment` (#1572)
folkertdev Apr 21, 2025
d9dac3c
Auto merge of #139309 - RalfJung:abi_unsupported_vector_types, r=fee1…
bors Apr 24, 2025
00417de
Suggest {to,from}_ne_bytes for transmutations between arrays and inte…
bend-n Mar 31, 2025
eef57cb
Pass Option<Span> to codegen_unwind_terminate
bjorn3 Apr 24, 2025
349430c
Avoid creating a second UnwindContext in finalize_definitions
bjorn3 Apr 24, 2025
b59f697
Relocation improvements for .eh_frame
bjorn3 Apr 24, 2025
f55c2c0
Merge pull request #1575 from rust-lang/exception-handling-preparation
bjorn3 Apr 24, 2025
6e2490c
Merge pull request #1576 from Urgau/triagebot-issue-links-no-mentions
Urgau Apr 27, 2025
daaae11
Implement the internal feature `cfg_target_has_reliable_f16_f128`
tgross35 Apr 24, 2025
c179f96
AsyncDrop implementation using shim codegen of async_drop_in_place::{…
azhogin Aug 26, 2024
41dbfa7
Sync from rust cb31a009e3e735ab08613cec2d8a5a754e65596f
bjorn3 Apr 28, 2025
fcf198b
Rustup to rustc 1.88.0-nightly (cb31a009e 2025-04-27)
bjorn3 Apr 28, 2025
17403cd
Fix rustc test suite
bjorn3 Apr 28, 2025
6412cfb
Rollup merge of #140323 - tgross35:cfg-unstable-float, r=Urgau
ChrisDenton Apr 28, 2025
7a8d368
Fix std_example.rs on s390x
bjorn3 Apr 29, 2025
bfabf71
Fix naked asm symbol name for cg_clif on macOS
bjorn3 Apr 30, 2025
88c48cd
Sync from rust 74509131e85a97353c67c503ea32e148a56cf4bd
bjorn3 Apr 30, 2025
e17184b
Rustup to rustc 1.88.0-nightly (74509131e 2025-04-29)
bjorn3 Apr 30, 2025
66d2f6b
Fix rustc test suite
bjorn3 Apr 30, 2025
23f12ff
Rollup merge of #134232 - bjorn3:naked_asm_improvements, r=wesleywiser
matthiaskrgr Apr 30, 2025
e864f0f
Sync from rust b45dd71d1824f176fba88f6c40467030a16afa2c
bjorn3 May 1, 2025
a308984
Rustup to rustc 1.88.0-nightly (b45dd71d1 2025-04-30)
bjorn3 May 1, 2025
5930cd9
Rename Instance::new to Instance::new_raw and add a note that it is raw
compiler-errors Apr 28, 2025
dfe7636
Rustup to rustc 1.88.0-nightly (13e879094 2025-05-04)
bjorn3 May 5, 2025
fe059c1
Clif ir comment improvements
bjorn3 May 2, 2025
9196eb3
Fix mini_core for panic=unwind
bjorn3 May 7, 2025
2f8f464
Fix mini_core on Windows and macOS
bjorn3 May 7, 2025
e6d288b
Use intrinsics for `{f16,f32,f64,f128}::{minimum,maximum}` operations
Urgau May 8, 2025
7b670d2
Sync from rust 777d372772aa3b39ba7273fcb8208a89f2ab0afd
bjorn3 May 18, 2025
bc02a99
Rustup to rustc 1.89.0-nightly (777d37277 2025-05-17)
bjorn3 May 18, 2025
0e43247
Fix rustc testsuite
bjorn3 May 18, 2025
04c7e5a
Rustup to rustc 1.89.0-nightly (60dabef95 2025-05-19)
bjorn3 May 20, 2025
81af658
Make clif ir debug output a bit nicer
bjorn3 May 20, 2025
4c39287
Update to Cranelift 0.120
bjorn3 May 5, 2025
8e3d0b2
Update availability of Cranelift (#1579)
stefnotch May 20, 2025
ff1a5ab
Rename `cfg_match!` to `cfg_select!`
tgross35 Feb 18, 2025
3ab6af0
Use Cranelift bitcast instead of store & load to bitcast between vect…
beetrees May 21, 2025
7c026ea
Add missing space in usage.md
bjorn3 May 23, 2025
dcd3168
Use correct sign extension on `__powi*f2` arguments
beetrees May 23, 2025
f0fb19c
Add missing float libcalls to `compiler_builtins.rs`
beetrees May 24, 2025
87c425b
Add basic support for `f16`/`f128` values
beetrees May 23, 2025
27a9590
Add `f16`/`f128` `+`/`-`/`*`/`/`/`%` support
beetrees May 23, 2025
38d48db
Add `f16`/`f128` comparison support
beetrees May 23, 2025
e46186f
Add support for casting to and from `f16`/`f128`
beetrees May 23, 2025
2055f01
Add `f16`/`f128` intrinsic support
beetrees May 23, 2025
02195f5
Enable tests and `compiler-builtins` for `f16`/`f128`
beetrees May 23, 2025
0da0dac
Merge pull request #1574 from beetrees/f16-f128-mvp
bjorn3 May 24, 2025
aa04a27
Sync from rust 5e16c662062fd6dee91f0fe2a1580483488d80cf
bjorn3 May 25, 2025
979dcf8
Rustup to rustc 1.89.0-nightly (5e16c6620 2025-05-24)
bjorn3 May 25, 2025
3816385
Merge commit '979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785' into sync_cg_…
bjorn3 May 25, 2025
4aed799
Update tidy exceptions
bjorn3 May 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_cranelift/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
- name: Rustfmt
run: |
cargo fmt --check
rustfmt --check build_system/main.rs
rustfmt --check example/*
rustfmt --check scripts/*.rs
rustfmt --check --edition 2024 build_system/main.rs
rustfmt --check --edition 2024 example/*
rustfmt --check --edition 2024 scripts/*.rs


test:
Expand Down
80 changes: 45 additions & 35 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,39 +43,42 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-assembler-x64"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e4b56ebe316895d3fa37775d0a87b0c889cc933f5c8b253dbcc7c7bcb7fe7e4"
checksum = "9ff8e35182c7372df00447cb90a04e584e032c42b9b9b6e8c50ddaaf0d7900d5"
dependencies = [
"cranelift-assembler-x64-meta",
]

[[package]]
name = "cranelift-assembler-x64-meta"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95cabbc01dfbd7dcd6c329ca44f0212910309c221797ac736a67a5bc8857fe1b"
checksum = "14220f9c2698015c3b94dc6b84ae045c1c45509ddc406e43c6139252757fdb7a"
dependencies = [
"cranelift-srcgen",
]

[[package]]
name = "cranelift-bforest"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76ffe46df300a45f1dc6f609dc808ce963f0e3a2e971682c479a2d13e3b9b8ef"
checksum = "d372ef2777ceefd75829e1390211ac240e9196bc60699218f7ea2419038288ee"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-bitset"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b265bed7c51e1921fdae6419791d31af77d33662ee56d7b0fa0704dc8d231cab"
checksum = "56323783e423818fa89ce8078e90a3913d2a6e0810399bfce8ebd7ee87baa81f"

[[package]]
name = "cranelift-codegen"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e606230a7e3a6897d603761baee0d19f88d077f17b996bb5089488a29ae96e41"
checksum = "74ffb780aab6186c6e9ba26519654b1ac55a09c0a866f6088a4efbbd84da68ed"
dependencies = [
"bumpalo",
"cranelift-assembler-x64",
Expand All @@ -98,43 +101,44 @@ dependencies = [

[[package]]
name = "cranelift-codegen-meta"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a63bffafc23bc60969ad528e138788495999d935f0adcfd6543cb151ca8637d"
checksum = "c23ef13814d3b39c869650d5961128cbbecad83fbdff4e6836a03ecf6862d7ed"
dependencies = [
"cranelift-assembler-x64",
"cranelift-assembler-x64-meta",
"cranelift-codegen-shared",
"cranelift-srcgen",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af50281b67324b58e843170a6a5943cf6d387c06f7eeacc9f5696e4ab7ae7d7e"
checksum = "b9f623300657679f847803ce80811454bfff89cea4f6bf684be5c468d4a73631"

[[package]]
name = "cranelift-control"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c20c1b38d1abfbcebb0032e497e71156c0e3b8dcb3f0a92b9863b7bcaec290c"
checksum = "31f4168af69989aa6b91fab46799ed4df6096f3209f4a6c8fb4358f49c60188f"
dependencies = [
"arbitrary",
]

[[package]]
name = "cranelift-entity"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c2c67d95507c51b4a1ff3f3555fe4bfec36b9e13c1b684ccc602736f5d5f4a2"
checksum = "ca6fa9bae1c8de26d71ac2162f069447610fd91e7780cb480ee0d76ac81eabb8"
dependencies = [
"cranelift-bitset",
]

[[package]]
name = "cranelift-frontend"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e002691cc69c38b54fc7ec93e5be5b744f627d027031d991cc845d1d512d0ce"
checksum = "b8219205608aa0b0e6769b580284a7e055c7e0c323c1041cde7ca078add3e412"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -144,15 +148,15 @@ dependencies = [

[[package]]
name = "cranelift-isle"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e93588ed1796cbcb0e2ad160403509e2c5d330d80dd6e0014ac6774c7ebac496"
checksum = "588d0c5964f10860b04043e55aab26d7f7a206b0fd4f10c5260e8aa5773832bd"

[[package]]
name = "cranelift-jit"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17f6682f0b193d6b7873cc8e7ed67e8776a8a26f50eeabf88534e9be618b9a03"
checksum = "56bd917ddc524f84f4066f954062875bdfc0dffea068ee94e906d98de5ac7c33"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -170,9 +174,9 @@ dependencies = [

[[package]]
name = "cranelift-module"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff19784c6de05116e63e6a34791012bd927b2a4eac56233039c46f1b6a4edac8"
checksum = "68a03c057d8a992e06596c871341e446af43ff9224f941e5b8adea39137a5391"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -181,9 +185,9 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5b09bdd6407bf5d89661b80cf926ce731c9e8cc184bf49102267a2369a8358e"
checksum = "19ed3c94cb97b14f92b6a94a1d45ef8c851f6a2ad9114e5d91d233f7da638fed"
dependencies = [
"cranelift-codegen",
"libc",
Expand All @@ -192,9 +196,9 @@ dependencies = [

[[package]]
name = "cranelift-object"
version = "0.118.0"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "685e8661a30d1cb69509f589ac643adeee79c5f63c0da316431b9fad29e6d3b4"
checksum = "a64dacef362a69375a604f6636e5e9a174fb96dba3b273646fcd9fa85c1d0997"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -205,6 +209,12 @@ dependencies = [
"target-lexicon",
]

[[package]]
name = "cranelift-srcgen"
version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85256fac1519a7d25a040c1d850fba67478f3f021ad5fdf738ba4425ee862dbf"

[[package]]
name = "crc32fast"
version = "1.4.2"
Expand Down Expand Up @@ -331,9 +341,9 @@ dependencies = [

[[package]]
name = "regalloc2"
version = "0.11.1"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "145c1c267e14f20fb0f88aa76a1c5ffec42d592c1d28b3cd9148ae35916158d3"
checksum = "5216b1837de2149f8bc8e6d5f88a9326b63b8c836ed58ce4a0a29ec736a59734"
dependencies = [
"allocator-api2",
"bumpalo",
Expand Down Expand Up @@ -436,9 +446,9 @@ checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"

[[package]]
name = "wasmtime-jit-icache-coherence"
version = "31.0.0"
version = "33.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a54f6c6c7e9d7eeee32dfcc10db7f29d505ee7dd28d00593ea241d5f70698e64"
checksum = "175e924dbc944c185808466d1e90b5a7feb610f3b9abdfe26f8ee25fd1086d1c"
dependencies = [
"anyhow",
"cfg-if",
Expand Down
24 changes: 12 additions & 12 deletions compiler/rustc_codegen_cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.118.0", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.118.0" }
cranelift-module = { version = "0.118.0" }
cranelift-native = { version = "0.118.0" }
cranelift-jit = { version = "0.118.0", optional = true }
cranelift-object = { version = "0.118.0" }
cranelift-codegen = { version = "0.120.0", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.120.0" }
cranelift-module = { version = "0.120.0" }
cranelift-native = { version = "0.120.0" }
cranelift-jit = { version = "0.120.0", optional = true }
cranelift-object = { version = "0.120.0" }
target-lexicon = "0.13"
gimli = { version = "0.31", default-features = false, features = ["write"] }
object = { version = "0.36", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
Expand All @@ -24,12 +24,12 @@ smallvec = "1.8.1"

[patch.crates-io]
# Uncomment to use an unreleased version of cranelift
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-31.0.0", version = "0.118.0" }
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-31.0.0", version = "0.118.0" }
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-31.0.0", version = "0.118.0" }
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-31.0.0", version = "0.118.0" }
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-31.0.0", version = "0.118.0" }
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-31.0.0", version = "0.118.0" }
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-33.0.0", version = "0.120.0" }

# Uncomment to use local checkout of cranelift
#cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If not please open an issue.

## Download using Rustup

The Cranelift codegen backend is distributed in nightly builds on Linux and x86_64 macOS. If you want to
The Cranelift codegen backend is distributed in nightly builds on Linux, macOS and x86_64 Windows. If you want to
install it using Rustup, you can do that by running:

```bash
Expand Down Expand Up @@ -79,7 +79,7 @@ For more docs on how to build and test see [build_system/usage.txt](build_system
Not all targets are available as rustup component for nightly. See notes in the platform support matrix.

[^xcoff]: XCOFF object file format is not supported.
[^no-rustup]: Not available as rustup component for nightly. You can build it yourself.
[^no-rustup]: Not available as [rustup component for nightly](https://rust-lang.github.io/rustup-components-history/). You can build it yourself.

## Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub(crate) fn build_backend(
let mut cmd = CG_CLIF.build(&bootstrap_host_compiler, dirs);

let mut rustflags = rustflags_from_env("RUSTFLAGS");
rustflags.push("-Zallow-features=rustc_private".to_owned());
rustflags.push("-Zallow-features=rustc_private,f16,f128".to_owned());
rustflags_to_cmd_env(&mut cmd, "RUSTFLAGS", &rustflags);

if env::var("CG_CLIF_EXPENSIVE_CHECKS").is_ok() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ fn build_llvm_sysroot_for_triple(compiler: Compiler) -> SysrootTarget {
let file_name_str = file.file_name().unwrap().to_str().unwrap();
if (file_name_str.contains("rustc_")
&& !file_name_str.contains("rustc_std_workspace_")
&& !file_name_str.contains("rustc_demangle"))
&& !file_name_str.contains("rustc_demangle")
&& !file_name_str.contains("rustc_literal_escaper"))
|| file_name_str.contains("chalk")
|| file_name_str.contains("tracing")
|| file_name_str.contains("regex")
Expand Down Expand Up @@ -234,7 +235,7 @@ fn build_clif_sysroot_for_triple(
compiler.rustflags.extend(rustflags);
let mut build_cmd = STANDARD_LIBRARY.build(&compiler, dirs);
build_cmd.arg("--release");
build_cmd.arg("--features").arg("backtrace panic-unwind compiler-builtins-no-f16-f128");
build_cmd.arg("--features").arg("backtrace panic-unwind");
build_cmd.arg(format!("-Zroot-dir={}", STDLIB_SRC.to_path(dirs).display()));
build_cmd.env("CARGO_PROFILE_RELEASE_DEBUG", "true");
build_cmd.env("__CARGO_DEFAULT_LIB_METADATA", "cg_clif");
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ These are a few functions that allow you to easily run rust code from the shell

```bash
function jit_naked() {
echo "$@" | $cg_clif_dir/dist/rustc-clif - -Zunstable-options -Cllvm-args=jit-mode-Cprefer-dynamic
echo "$@" | $cg_clif_dir/dist/rustc-clif - -Zunstable-options -Cllvm-args=jit-mode -Cprefer-dynamic
}

function jit() {
Expand Down
20 changes: 19 additions & 1 deletion compiler/rustc_codegen_cranelift/example/mini_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,28 @@ fn panic_cannot_unwind() -> ! {
}

#[lang = "eh_personality"]
fn eh_personality() -> ! {
// FIXME personality signature depends on target
fn eh_personality(
_version: i32,
_actions: i32,
_exception_class: u64,
_exception_object: *mut (),
_context: *mut (),
) -> i32 {
loop {}
}

#[lang = "panic_in_cleanup"]
fn panic_in_cleanup() -> ! {
loop {}
}

#[cfg(all(unix, not(target_vendor = "apple")))]
#[link(name = "gcc_s")]
extern "C" {
fn _Unwind_Resume(exc: *mut ()) -> !;
}

#[lang = "drop_in_place"]
#[allow(unconditional_recursion)]
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_codegen_cranelift/example/std_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ fn main() {
enum Never {}
}

#[cfg(not(target_arch = "s390x"))] // s390x doesn't have vector instructions enabled by default
foo(I64X2([0, 0]));

transmute_wide_pointer();
Expand Down Expand Up @@ -203,9 +204,11 @@ fn rust_call_abi() {
rust_call_abi_callee((1, 2));
}

#[cfg_attr(target_arch = "s390x", allow(dead_code))]
#[repr(simd)]
struct I64X2([i64; 2]);

#[cfg_attr(target_arch = "s390x", allow(dead_code))]
#[allow(improper_ctypes_definitions)]
extern "C" fn foo(_a: I64X2) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
index bf2b6d59f88..d5ccce03bbf 100644
--- a/library/core/src/sync/atomic.rs
+++ b/library/core/src/sync/atomic.rs
@@ -300,8 +300,6 @@ impl_atomic_primitive!(AtomicI32(i32), size("32"), align(4));
impl_atomic_primitive!(AtomicU32(u32), size("32"), align(4));
impl_atomic_primitive!(AtomicI64(i64), size("64"), align(8));
impl_atomic_primitive!(AtomicU64(u64), size("64"), align(8));
-impl_atomic_primitive!(AtomicI128(i128), size("128"), align(16));
-impl_atomic_primitive!(AtomicU128(u128), size("128"), align(16));

#[cfg(target_pointer_width = "16")]
impl_atomic_primitive!(AtomicIsize(isize), size("ptr"), align(2));
@@ -3585,44 +3585,6 @@ pub const fn as_ptr(&self) -> *mut $int_type {
8,
u64 AtomicU64
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2025-03-30"
channel = "nightly-2025-05-25"
components = ["rust-src", "rustc-dev", "llvm-tools"]
profile = "minimal"
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ verbose-tests = false
# disabled bootstrap will crash trying to copy llvm tools for the bootstrap
# compiler.
llvm-tools = false
std-features = ["panic-unwind", "compiler-builtins-no-f16-f128"]
std-features = ["panic-unwind"]

EOF

Expand Down
Loading
Loading