Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,13 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
// option causes bugs in the LLVM WebAssembly backend. You should be able to
// remove this check when Rust's minimum supported LLVM version is >= 18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we could try wasm again now, but not in this PR of course...

// https://github.com/llvm/llvm-project/pull/65876
if (!Trip.isWasm()) {
//
// Also keep traps after noreturn calls on Windows, because the trap is
// needed to keep the return address within the calling function's
// .pdata range. Without it, RtlLookupFunctionEntry resolves the wrong
// function and SEH unwinding (used for backtraces) terminates early.
// See https://github.com/rust-lang/rust/issues/140489
if (!Trip.isWasm() && !Trip.isOSWindows()) {
Options.NoTrapAfterNoreturn = true;
}
}
Expand Down
5 changes: 0 additions & 5 deletions tests/ui/runtime/backtrace-debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,9 @@ macro_rules! dump_and_die {
// there, even on i686-pc-windows-msvc. We do the best we can in
// rust-lang/rust to test it as well, but sometimes we just gotta keep
// landing PRs.
//
// aarch64-msvc/arm64ec-msvc is broken as its backtraces are truncated.
// See https://github.com/rust-lang/rust/issues/140489
if cfg!(any(target_os = "android",
all(target_os = "linux", target_arch = "arm"),
all(target_env = "msvc", target_arch = "x86"),
all(target_env = "msvc", target_arch = "aarch64"),
all(target_env = "msvc", target_arch = "arm64ec"),
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd")) {
Expand Down
Loading