Skip to content

Commit 68c5939

Browse files
committed
Change the way libunwind is linked for *-windows-gnullvm targets
1 parent f42b6fa commit 68c5939

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

library/unwind/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,3 @@ extern "C" {}
104104
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
105105
#[link(name = "unwind", kind = "static", modifiers = "-bundle")]
106106
extern "C" {}
107-
108-
#[cfg(all(target_os = "windows", target_env = "gnu", target_abi = "llvm"))]
109-
#[link(name = "unwind", kind = "static", modifiers = "-bundle")]
110-
extern "C" {}

library/unwind/src/libunwind.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ pub type _Unwind_Exception_Cleanup_Fn =
9090
// rustc_codegen_ssa::src::back::symbol_export, rustc_middle::middle::exported_symbols
9191
// and RFC 2841
9292
#[cfg_attr(
93-
all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")),
93+
any(
94+
all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")),
95+
all(target_os = "windows", target_env = "gnu", target_abi = "llvm")
96+
),
9497
link(name = "unwind", kind = "static", modifiers = "-bundle")
9598
)]
9699
extern "C-unwind" {

src/bootstrap/compile.rs

-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ fn copy_third_party_objects(
206206
}
207207

208208
if target == "x86_64-fortanix-unknown-sgx"
209-
|| target.contains("pc-windows-gnullvm")
210209
|| builder.config.llvm_libunwind(target) == LlvmLibunwind::InTree
211210
&& (target.contains("linux") || target.contains("fuchsia"))
212211
{

0 commit comments

Comments
 (0)