Skip to content

Commit b0f972f

Browse files
committed
Cranelift: Revert raw-dylib for Windows futex APIs
1 parent 148ecb4 commit b0f972f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 0606a1b0ebd2ca4112412472d28b39a8437c708b Mon Sep 17 00:00:00 2001
2+
From: Chris Denton <chris@chrisdenton.dev>
3+
Date: Tue, 16 Apr 2024 15:34:49 +0000
4+
Subject: [PATCH] Revert use raw-dylib for Windows futex APIs
5+
6+
---
7+
library/std/src/sys/pal/windows/c.rs | 4 +---
8+
1 file changed, 1 insertion(+), 3 deletions(-)
9+
10+
diff --git a/library/std/src/sys/pal/windows/c.rs b/library/std/src/sys/pal/windows/c.rs
11+
index 0eb773f8bb9..1c828bac4b6 100644
12+
--- a/library/std/src/sys/pal/windows/c.rs
13+
+++ b/library/std/src/sys/pal/windows/c.rs
14+
@@ -357,9 +357,7 @@ pub fn GetTempPath2W(bufferlength: u32, buffer: PWSTR) -> u32 {
15+
}
16+
17+
#[cfg(not(target_vendor = "win7"))]
18+
-// Use raw-dylib to import synchronization functions to workaround issues with the older mingw import library.
19+
-#[cfg_attr(target_arch = "x86", link(name = "api-ms-win-core-synch-l1-2-0", kind = "raw-dylib", import_name_type = "undecorated"))]
20+
-#[cfg_attr(not(target_arch = "x86"), link(name = "api-ms-win-core-synch-l1-2-0", kind = "raw-dylib"))]
21+
+#[link(name = "synchronization")]
22+
extern "system" {
23+
pub fn WaitOnAddress(
24+
address: *const c_void,
25+
--
26+
2.42.0.windows.2
27+

0 commit comments

Comments
 (0)