Skip to content

Commit 4ea25a5

Browse files
NobodyXuChrisDenton
andcommitted
Update windows_targets.rs
Co-authored-by: Chris Denton <[email protected]>
1 parent 0f7565a commit 4ea25a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/windows/windows_targets.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ macro_rules! link_macro {
99
// have in this repo. So instead we always link kernel32.lib and add the rest of the import
1010
// libraries below by using an empty extern block. This works because extern blocks are not
1111
// connected to the library given in the #[link] attribute.
12-
#[link(name = "kernel32", kind = "raw-dylib")]
12+
#[cfg_attr(not(target_arch = "x86"), link(name = $library, kind = "raw-dylib", modifiers = "+verbatim"))]
13+
#[cfg_attr(target_arch = "x86", link(name = $library, kind = "raw-dylib", modifiers = "+verbatim", import_name_type = "undecorated"))]
1314
extern $abi {
1415
$(#[link_name=$link_name])?
1516
pub fn $($function)*;

0 commit comments

Comments
 (0)