Skip to content
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

Rollup of 8 pull requests #136734

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
6620e2b
std: detect stack overflows in TLS destructors on UNIX
joboet Oct 5, 2024
68283cc
Updated several files to use rust intrinsic macros instead of the leg…
vayunbiyani Jan 10, 2025
f141118
Merge commit '728bc27f32c05ac8a9b5eb33fd101e479072984f' into sync_cg_…
bjorn3 Jan 20, 2025
e3aa2b7
Rollup merge of #135333 - vayunbiyani:test-environment, r=RalfJung
matthiaskrgr Jan 20, 2025
23a32e3
Rollup merge of #135776 - bjorn3:sync_cg_clif-2025-01-20, r=bjorn3
matthiaskrgr Jan 20, 2025
ffe312e
Ignore global git hooks when importing rust-lang/rust git repo
jyn514 Jan 20, 2025
adcd89a
Merge pull request #1556 from jyn514/git-hooks
bjorn3 Jan 21, 2025
65b3b0e
Merge branch 'sync_from_rust'
bjorn3 Jan 21, 2025
c4a3398
remove support for the #[start] attribute
RalfJung Dec 14, 2024
869ca6a
Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors
bors Jan 21, 2025
c52eee7
Sync from rust 649b995a9febd658b2570160703dff6fdc038ab2
bjorn3 Jan 23, 2025
ccf8977
Rustup to rustc 1.86.0-nightly (649b995a9 2025-01-22)
bjorn3 Jan 23, 2025
50c14ce
Fix rustc test suite
bjorn3 Jan 23, 2025
eeb7930
Add missing entry to builtin_functions
bjorn3 Jan 9, 2025
e7b1853
Update to Cranelift 0.116
bjorn3 Jan 23, 2025
996d570
Fix cg_clif testing coretests
bjorn3 Jan 23, 2025
e090db8
Optimize `Rc::<str>::default()` implementation
Kijewski Jan 26, 2025
0ef7ea2
Change `collect_and_partition_mono_items` tuple return type to a struct
oli-obk Jan 27, 2025
61e48a2
Windows x86: Change `i128` to return via the vector ABI
tgross35 Dec 14, 2024
7b19e13
Auto merge of #134290 - tgross35:windows-i128-callconv, r=bjorn3,wesl…
bors Jan 28, 2025
9f44caa
Do not treat vtable supertraits as distinct when bound with different…
compiler-errors Jan 10, 2025
96bea7a
Use ExistentialTraitRef throughout codegen
compiler-errors Jan 10, 2025
2301f3e
introduce `ty::Value`
Jan 27, 2025
a7b16ac
Auto merge of #135318 - compiler-errors:vtable-fixes, r=lcnr
bors Jan 31, 2025
77f3081
Insert null checks for pointer dereferences when debug assertions are…
1c3t3a Dec 17, 2024
b8172d7
Auto merge of #134424 - 1c3t3a:null-checks, r=saethlin
bors Jan 31, 2025
83ab12f
Implement MIR, CTFE, and codegen for unsafe binders
compiler-errors Jan 31, 2025
6c0f4bb
Enforce unsafe binders must be Copy (for now)
compiler-errors Jan 31, 2025
89abc19
Rename `tcx.ensure()` to `tcx.ensure_ok()`
Zalathar Jan 30, 2025
bbb8733
Rollup merge of #130514 - compiler-errors:unsafe-binders, r=oli-obk
matthiaskrgr Feb 1, 2025
77009e9
Sync from rust 854f22563c8daf92709fae18ee6aed52953835cd
bjorn3 Feb 1, 2025
3228d5e
Rustup to rustc 1.86.0-nightly (854f22563 2025-01-31)
bjorn3 Feb 1, 2025
42271d4
Fix rustc test suite
bjorn3 Feb 1, 2025
c8f0f36
Rustfmt
bjorn3 Feb 1, 2025
cf5521b
Enable x87 target feature on x86_64
bjorn3 Feb 1, 2025
84595c2
Rollup merge of #136279 - Zalathar:ensure-ok, r=oli-obk
matthiaskrgr Feb 2, 2025
098235c
skip result check for TLS stack overflows in stack overflow test on W…
joboet Feb 2, 2025
fa43703
Contracts core intrinsics.
pnkfelix Dec 2, 2024
3a14dbb
Refactor contract builtin macro + error handling
celinval Jan 15, 2025
f71e666
Update `compiler-builtins` to 0.1.145
tgross35 Jan 16, 2025
a005ccd
Rollup merge of #136537 - tgross35:update-builtins, r=tgross35
jieyouxu Feb 5, 2025
b226c6e
Sync from rust bef3c3b01f690de16738b1c9f36470fbfc6ac623
bjorn3 Feb 5, 2025
0ea2ce4
Rustup to rustc 1.86.0-nightly (bef3c3b01 2025-02-04)
bjorn3 Feb 5, 2025
d31dd48
create `initial_rustdoc` field in `Build`
onur-ozkan Feb 6, 2025
a983b58
Generate correct terminate block under Wasm EH
purplesyringa Jan 28, 2025
b0b0b25
Remove unnecessary abort_if_errors from cg_clif
bjorn3 Feb 6, 2025
ed91b73
Simplify usage of UnsafeMessage::send
bjorn3 Feb 6, 2025
6f515fb
ci: Use largedisk for loongarch
Flakebi Feb 7, 2025
b004312
Implement arm64 vaddlvq_u8 and vld1q_u8_x4 vendor intrinsics
bjorn3 Feb 7, 2025
0376470
Disable extern_weak test on macOS
bjorn3 Feb 7, 2025
c92520a
Workaround bug in the linker-warning test
bjorn3 Feb 1, 2025
4633398
Remove outdated fixme
bjorn3 Feb 7, 2025
1358569
Convert `EMPTY_LINE_AFTER_OUTER_ATTR` and `EMPTY_LINE_AFTER_OUTER_ATT…
GuillaumeGomez Feb 6, 2025
cca8995
Update UI tests
GuillaumeGomez Feb 6, 2025
9221e33
fix empty after lint on impl/trait items
jdonszelmann Feb 6, 2025
bed71f9
fix typo
jdonszelmann Feb 7, 2025
a9df224
std: move `io` module out of `pal`
joboet Jan 18, 2025
7433ba6
std: get rid of `sys_common::io`
joboet Jan 18, 2025
cd52a95
add tests for spurious failure and fix typo
jdonszelmann Feb 7, 2025
8bbe4a0
Sync from rust 942db6782f4a28c55b0b75b38fd4394d0483390f
bjorn3 Feb 7, 2025
6c4b94b
Rustup to rustc 1.86.0-nightly (942db6782 2025-02-06)
bjorn3 Feb 7, 2025
8332329
Fix rustc test suite
bjorn3 Feb 7, 2025
cac271f
Merge commit '8332329f83d4ef34479fec67cc21b21246dca6b5' into sync_cg_…
bjorn3 Feb 7, 2025
5a2784e
Rollup merge of #131282 - joboet:thread_local_stack_overflow, r=Amanieu
matthiaskrgr Feb 8, 2025
431abee
Rollup merge of #135696 - joboet:move_pal_io, r=Noratrieb
matthiaskrgr Feb 8, 2025
c728783
Rollup merge of #136099 - Kijewski:pr-rc-str-default, r=ibraheemdev
matthiaskrgr Feb 8, 2025
b444662
Rollup merge of #136200 - purplesyringa:wasm-eh-fixes, r=bjorn3
matthiaskrgr Feb 8, 2025
6ee5f05
Rollup merge of #136626 - onur-ozkan:initial-rustdoc, r=jieyouxu
matthiaskrgr Feb 8, 2025
e4b7c45
Rollup merge of #136657 - jdonszelmann:empty-line-after, r=y21,flip19…
matthiaskrgr Feb 8, 2025
669f4c3
Rollup merge of #136679 - Flakebi:loongarch64-diskspace, r=marcoieni
matthiaskrgr Feb 8, 2025
cad519b
Rollup merge of #136715 - bjorn3:sync_cg_clif-2025-02-07, r=bjorn3
matthiaskrgr Feb 8, 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
60 changes: 30 additions & 30 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-bforest"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac89549be94911dd0e839b4a7db99e9ed29c17517e1c026f61066884c168aa3c"
checksum = "e15d04a0ce86cb36ead88ad68cf693ffd6cda47052b9e0ac114bc47fd9cd23c4"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-bitset"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9bd49369f76c77e34e641af85d0956869237832c118964d08bf5f51f210875a"
checksum = "7c6e3969a7ce267259ce244b7867c5d3bc9e65b0a87e81039588dfdeaede9f34"

[[package]]
name = "cranelift-codegen"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd96ce9cf8efebd7f5ab8ced5a0ce44250280bbae9f593d74a6d7effc3582a35"
checksum = "2c22032c4cb42558371cf516bb47f26cdad1819d3475c133e93c49f50ebf304e"
dependencies = [
"bumpalo",
"cranelift-bforest",
Expand All @@ -82,42 +82,42 @@ dependencies = [

[[package]]
name = "cranelift-codegen-meta"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a68e358827afe4bfb6239fcbf6fbd5ac56206ece8a99c8f5f9bbd518773281a"
checksum = "c904bc71c61b27fc57827f4a1379f29de64fe95653b620a3db77d59655eee0b8"
dependencies = [
"cranelift-codegen-shared",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e184c9767afbe73d50c55ec29abcf4c32f9baf0d9d22b86d58c4d55e06dee181"
checksum = "40180f5497572f644ce88c255480981ae2ec1d7bb4d8e0c0136a13b87a2f2ceb"

[[package]]
name = "cranelift-control"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cc7664f2a66f053e33f149e952bb5971d138e3af637f5097727ed6dc0ed95dd"
checksum = "26d132c6d0bd8a489563472afc171759da0707804a65ece7ceb15a8c6d7dd5ef"
dependencies = [
"arbitrary",
]

[[package]]
name = "cranelift-entity"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "118597e3a9cf86c3556fa579a7a23b955fa18231651a52a77a2475d305a9cf84"
checksum = "4b2d0d9618275474fbf679dd018ac6e009acbd6ae6850f6a67be33fb3b00b323"
dependencies = [
"cranelift-bitset",
]

[[package]]
name = "cranelift-frontend"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7638ea1efb069a0aa18d8ee67401b6b0d19f6bfe5de5e9ede348bfc80bb0d8c7"
checksum = "4fac41e16729107393174b0c9e3730fb072866100e1e64e80a1a963b2e484d57"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -127,15 +127,15 @@ dependencies = [

[[package]]
name = "cranelift-isle"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "15c53e1152a0b01c4ed2b1e0535602b8e86458777dd9d18b28732b16325c7dc0"
checksum = "1ca20d576e5070044d0a72a9effc2deacf4d6aa650403189d8ea50126483944d"

[[package]]
name = "cranelift-jit"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36972cab12ff246afe8d45b6a427669cf814bd393c661e5e8a8dedc26a81c73f"
checksum = "5e65c42755a719b09662b00c700daaf76cc35d5ace1f5c002ad404b591ff1978"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -153,9 +153,9 @@ dependencies = [

[[package]]
name = "cranelift-module"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11841b3f54ac480db1e8e8d5678ba901a13b387012d315e3f8fba3e7b7a80447"
checksum = "4d55612bebcf16ff7306c8a6f5bdb6d45662b8aa1ee058ecce8807ad87db719b"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -164,9 +164,9 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b7d8f895444fa52dd7bdd0bed11bf007a7fb43af65a6deac8fcc4094c6372f7"
checksum = "b8dee82f3f1f2c4cba9177f1cc5e350fe98764379bcd29340caa7b01f85076c7"
dependencies = [
"cranelift-codegen",
"libc",
Expand All @@ -175,9 +175,9 @@ dependencies = [

[[package]]
name = "cranelift-object"
version = "0.115.0"
version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e235ddfd19f100855ad03358c7ae0a13070c38a000701054cab46458cca6e81"
checksum = "aad5a6d3e379493c3f8b35dc61c93d0bf5f27003bbe20614e0200b0ec372ef52"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand Down Expand Up @@ -413,9 +413,9 @@ dependencies = [

[[package]]
name = "target-lexicon"
version = "0.12.16"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
checksum = "dc12939a1c9b9d391e0b7135f72fd30508b73450753e28341fed159317582a77"

[[package]]
name = "unicode-ident"
Expand All @@ -425,9 +425,9 @@ checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"

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

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.115.0", default-features = false, features = ["std", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.115.0" }
cranelift-module = { version = "0.115.0" }
cranelift-native = { version = "0.115.0" }
cranelift-jit = { version = "0.115.0", optional = true }
cranelift-object = { version = "0.115.0" }
target-lexicon = "0.12.0"
cranelift-codegen = { version = "0.116.0", default-features = false, features = ["std", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.116.0" }
cranelift-module = { version = "0.116.0" }
cranelift-native = { version = "0.116.0" }
cranelift-jit = { version = "0.116.0", optional = true }
cranelift-object = { version = "0.116.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-28.0.0", version = "0.115.0" }
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-28.0.0", version = "0.115.0" }
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-28.0.0", version = "0.115.0" }
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-28.0.0", version = "0.115.0" }
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-28.0.0", version = "0.115.0" }
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-28.0.0", version = "0.115.0" }
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-29.0.0", version = "0.116.0" }
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-29.0.0", version = "0.116.0" }
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-29.0.0", version = "0.116.0" }
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-29.0.0", version = "0.116.0" }
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-29.0.0", version = "0.116.0" }
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-29.0.0", version = "0.116.0" }

# Uncomment to use local checkout of cranelift
#cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/build_system/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fn init_git_repo(repo_dir: &Path) {
spawn_and_wait(git_add_cmd);

let mut git_commit_cmd = git_command(repo_dir, "commit");
git_commit_cmd.arg("-m").arg("Initial commit").arg("-q");
git_commit_cmd.arg("-m").arg("Initial commit").arg("-q").arg("--no-verify");
spawn_and_wait(git_commit_cmd);
}

Expand Down
8 changes: 0 additions & 8 deletions compiler/rustc_codegen_cranelift/build_system/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,6 @@ impl<'a> TestRunner<'a> {
target_compiler.rustflags.extend(rustflags_from_env("RUSTFLAGS"));
target_compiler.rustdocflags.extend(rustflags_from_env("RUSTDOCFLAGS"));

// FIXME fix `#[linkage = "extern_weak"]` without this
if target_compiler.triple.contains("darwin") {
target_compiler.rustflags.extend([
"-Clink-arg=-undefined".to_owned(),
"-Clink-arg=dynamic_lookup".to_owned(),
]);
}

let jit_supported = use_unstable_features
&& is_native
&& target_compiler.triple.contains("x86_64")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ fn main() {

assert_eq!(((|()| 42u8) as fn(()) -> u8)(()), 42);

#[cfg(not(any(jit, windows)))]
#[cfg(not(any(jit, target_vendor = "apple", windows)))]
{
extern "C" {
#[linkage = "extern_weak"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ index 8402833..84592e0 100644
#[cfg(not(miri))] // unused in Miri
macro_rules! empty_max_mut {
@@ -2485,6 +2486,7 @@ take_tests! {
(take_mut_oob_max_range_to_inclusive, (..=usize::MAX), None, empty_max_mut!()),
(take_mut_in_bounds_max_range_from, (usize::MAX..), Some(&mut [] as _), empty_max_mut!()),
(split_off_mut_oob_max_range_to_inclusive, (..=usize::MAX), None, empty_max_mut!()),
(split_off_mut_in_bounds_max_range_from, (usize::MAX..), Some(&mut [] as _), empty_max_mut!()),
}
+*/

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-01-20"
channel = "nightly-2025-02-07"
components = ["rust-src", "rustc-dev", "llvm-tools"]
profile = "minimal"
22 changes: 16 additions & 6 deletions compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,18 @@ rm tests/ui/match/match-float.rs
# ==================
rm tests/ui/codegen/issue-28950.rs # depends on stack size optimizations
rm tests/ui/codegen/init-large-type.rs # same
rm tests/ui/issues/issue-40883.rs # same
rm -r tests/run-make/fmt-write-bloat/ # tests an optimization
rm tests/ui/statics/const_generics.rs # same

# backend specific tests
# ======================
rm tests/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
rm -r tests/run-make/cross-lang-lto # same
rm -r tests/run-make/sepcomp-inlining # same
rm -r tests/run-make/sepcomp-separate # same
rm -r tests/run-make/sepcomp-cci-copies # same
rm -r tests/run-make/volatile-intrinsics # same
rm -r tests/run-make/llvm-ident # same
rm -r tests/run-make/no-builtins-attribute # same
rm -r tests/run-make/pgo-gen-no-imp-symbols # same
rm -r tests/run-make/llvm-location-discriminator-limit-dummy-span # same
rm tests/ui/abi/stack-protector.rs # requires stack protector support
rm -r tests/run-make/emit-stack-sizes # requires support for -Z emit-stack-sizes
rm -r tests/run-make/optimization-remarks-dir # remarks are LLVM specific
Expand Down Expand Up @@ -130,6 +127,7 @@ rm tests/ui/abi/large-byval-align.rs # exceeds implementation limit of Cranelift
rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
rm -r tests/run-make/strip # same
rm -r tests/run-make/compiler-builtins # Expects lib/rustlib/src/rust to contains the standard library source
rm -r tests/run-make/translation # same
rm -r tests/run-make/missing-unstable-trait-bound # This disables support for unstable features, but running cg_clif needs some unstable features
rm -r tests/run-make/const-trait-stable-toolchain # same
rm -r tests/run-make/incr-add-rust-src-component
Expand All @@ -156,8 +154,6 @@ cp $(../dist/rustc-clif --print target-libdir)/libstd-*.so ../dist/lib/

# prevent $(RUSTDOC) from picking up the sysroot built by x.py. It conflicts with the one used by
# rustdoc-clif
# FIXME remove the bootstrap changes once it is no longer necessary to revert rust-lang/rust#130642
# to avoid building rustc when testing stage0 run-make.
cat <<EOF | git apply -
diff --git a/tests/run-make/tools.mk b/tests/run-make/tools.mk
index ea06b620c4c..b969d0009c6 100644
Expand Down Expand Up @@ -196,6 +192,20 @@ index e7ae773ffa1d3..04bc2d7787da7 100644
// Provide necessary library search paths for rustc.
.env(dylib_env_var(), &env::join_paths(host_dylib_search_paths).unwrap());

diff --git a/tests/run-make/linker-warning/rmake.rs b/tests/run-make/linker-warning/rmake.rs
index 30387af428c..f7895b12961 100644
--- a/tests/run-make/linker-warning/rmake.rs
+++ b/tests/run-make/linker-warning/rmake.rs
@@ -57,7 +57,8 @@ fn main() {
.actual_text("(linker error)", out.stderr())
- .normalize(r#"/rustc[^/]*/"#, "/rustc/")
+ .normalize(r#"/tmp/rustc[^/]*/"#, "/tmp/rustc/")
+ .normalize("libpanic_abort", "libpanic_unwind")
.normalize(
regex::escape(run_make_support::build_root().to_str().unwrap()),
"/build-root",
)
.run();
EOF

echo "[TEST] rustc test suite"
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_cranelift/src/compiler_builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ builtin_functions! {
fn __umodti3(n: u128, d: u128) -> u128;
fn __modti3(n: i128, d: i128) -> i128;
fn __rust_u128_mulo(a: u128, b: u128, oflow: &mut i32) -> u128;
fn __rust_i128_mulo(a: i128, b: i128, oflow: &mut i32) -> i128;

// floats
fn __floattisf(i: i128) -> f32;
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_codegen_cranelift/src/driver/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ unsafe impl Send for UnsafeMessage {}

impl UnsafeMessage {
/// Send the message.
fn send(self) -> Result<(), mpsc::SendError<UnsafeMessage>> {
fn send(self) {
thread_local! {
/// The Sender owned by the local thread
static LOCAL_MESSAGE_SENDER: mpsc::Sender<UnsafeMessage> =
Expand All @@ -55,7 +55,9 @@ impl UnsafeMessage {
.lock().unwrap()
.clone();
}
LOCAL_MESSAGE_SENDER.with(|sender| sender.send(self))
LOCAL_MESSAGE_SENDER.with(|sender| {
sender.send(self).expect("rustc thread hung up before lazy JIT request was sent")
})
}
}

Expand Down Expand Up @@ -90,7 +92,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, codegen_mode: CodegenMode, jit_args: Vec<
create_jit_module(tcx, matches!(codegen_mode, CodegenMode::JitLazy));
let mut cached_context = Context::new();

let (_, cgus) = tcx.collect_and_partition_mono_items(());
let cgus = tcx.collect_and_partition_mono_items(()).codegen_units;
let mono_items = cgus
.iter()
.map(|cgu| cgu.items_in_deterministic_order(tcx).into_iter())
Expand Down Expand Up @@ -231,9 +233,7 @@ extern "C" fn clif_jit_fn(
) -> *const u8 {
// send the JIT request to the rustc thread, with a channel for the response
let (tx, rx) = mpsc::channel();
UnsafeMessage::JitFn { instance_ptr, trampoline_ptr, tx }
.send()
.expect("rustc thread hung up before lazy JIT request was sent");
UnsafeMessage::JitFn { instance_ptr, trampoline_ptr, tx }.send();

// block on JIT compilation result
rx.recv().expect("rustc thread hung up before responding to sent lazy JIT request")
Expand Down
Loading
Loading