Change the way libunwind is linked for *-windows-gnullvm targets

This commit is contained in:
Mateusz Mikuła 2022-11-01 12:22:30 +01:00
parent f42b6fa7ca
commit 68c5939722
3 changed files with 4 additions and 6 deletions

View file

@ -104,7 +104,3 @@ extern "C" {}
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
#[link(name = "unwind", kind = "static", modifiers = "-bundle")]
extern "C" {}
#[cfg(all(target_os = "windows", target_env = "gnu", target_abi = "llvm"))]
#[link(name = "unwind", kind = "static", modifiers = "-bundle")]
extern "C" {}

View file

@ -90,7 +90,10 @@ pub type _Unwind_Exception_Cleanup_Fn =
// rustc_codegen_ssa::src::back::symbol_export, rustc_middle::middle::exported_symbols
// and RFC 2841
#[cfg_attr(
all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")),
any(
all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")),
all(target_os = "windows", target_env = "gnu", target_abi = "llvm")
),
link(name = "unwind", kind = "static", modifiers = "-bundle")
)]
extern "C-unwind" {