Skip to content

Commit

Permalink
Update windows_targets.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Denton <chris@chrisdenton.dev>
  • Loading branch information
NobodyXu and ChrisDenton committed Jul 7, 2024
1 parent 05107b2 commit 9ee3a45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/windows/windows_targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ macro_rules! link_macro {
// have in this repo. So instead we always link kernel32.lib and add the rest of the import
// libraries below by using an empty extern block. This works because extern blocks are not
// connected to the library given in the #[link] attribute.
#[link(name = "kernel32", kind = "raw-dylib")]
#[cfg_attr(not(target_arch = "x86"), link(name = $library, kind = "raw-dylib", modifiers = "+verbatim"))]
#[cfg_attr(target_arch = "x86", link(name = $library, kind = "raw-dylib", modifiers = "+verbatim", import_name_type = "undecorated"))]
extern $abi {
$(#[link_name=$link_name])?
pub fn $($function)*;
Expand Down

0 comments on commit 9ee3a45

Please sign in to comment.