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 @@
#[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 enum _Unwind_Context {}
// 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" {

View file

@ -206,7 +206,6 @@ fn copy_third_party_objects(
}
if target == "x86_64-fortanix-unknown-sgx"
|| target.contains("pc-windows-gnullvm")
|| builder.config.llvm_libunwind(target) == LlvmLibunwind::InTree
&& (target.contains("linux") || target.contains("fuchsia"))
{