File tree Expand file tree Collapse file tree
compiler/rustc_llvm/llvm-wrapper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -347,7 +347,13 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
347347 // option causes bugs in the LLVM WebAssembly backend. You should be able to
348348 // remove this check when Rust's minimum supported LLVM version is >= 18
349349 // https://github.com/llvm/llvm-project/pull/65876
350- if (!Trip.isWasm ()) {
350+ //
351+ // Also keep traps after noreturn calls on Windows, because the trap is
352+ // needed to keep the return address within the calling function's
353+ // .pdata range. Without it, RtlLookupFunctionEntry resolves the wrong
354+ // function and SEH unwinding (used for backtraces) terminates early.
355+ // See https://github.com/rust-lang/rust/issues/140489
356+ if (!Trip.isWasm () && !Trip.isOSWindows ()) {
351357 Options.NoTrapAfterNoreturn = true ;
352358 }
353359 }
Original file line number Diff line number Diff line change @@ -47,14 +47,9 @@ macro_rules! dump_and_die {
4747 // there, even on i686-pc-windows-msvc. We do the best we can in
4848 // rust-lang/rust to test it as well, but sometimes we just gotta keep
4949 // landing PRs.
50- //
51- // aarch64-msvc/arm64ec-msvc is broken as its backtraces are truncated.
52- // See https://github.com/rust-lang/rust/issues/140489
5350 if cfg!( any( target_os = "android" ,
5451 all( target_os = "linux" , target_arch = "arm" ) ,
5552 all( target_env = "msvc" , target_arch = "x86" ) ,
56- all( target_env = "msvc" , target_arch = "aarch64" ) ,
57- all( target_env = "msvc" , target_arch = "arm64ec" ) ,
5853 target_os = "freebsd" ,
5954 target_os = "dragonfly" ,
6055 target_os = "openbsd" ) ) {
You can’t perform that action at this time.
0 commit comments