Skip to content

Commit d73ed7e

Browse files
authored
Revert ABI changes to the link macros (#3628)
1 parent 068989a commit d73ed7e

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

crates/libs/link/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ macro_rules! link {
3232
#[macro_export]
3333
macro_rules! link {
3434
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
35-
extern "C" {
35+
extern $abi {
3636
pub fn $($function)*;
3737
}
3838
)

crates/libs/targets/src/lib.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ macro_rules! link {
2828
}
2929

3030
/// Defines an external function to import.
31-
#[cfg(all(windows, not(windows_raw_dylib), target_arch = "x86"))]
31+
#[cfg(all(windows, not(windows_raw_dylib)))]
3232
#[macro_export]
3333
macro_rules! link {
3434
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
@@ -40,25 +40,12 @@ macro_rules! link {
4040
)
4141
}
4242

43-
/// Defines an external function to import.
44-
#[cfg(all(windows, not(windows_raw_dylib), not(target_arch = "x86")))]
45-
#[macro_export]
46-
macro_rules! link {
47-
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
48-
#[link(name = "windows.0.53.0")]
49-
extern "C" {
50-
$(#[link_name=$link_name])?
51-
pub fn $($function)*;
52-
}
53-
)
54-
}
55-
5643
/// Defines an external function to import.
5744
#[cfg(all(not(windows), not(windows_raw_dylib)))]
5845
#[macro_export]
5946
macro_rules! link {
6047
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
61-
extern "C" {
48+
extern $abi {
6249
pub fn $($function)*;
6350
}
6451
)

0 commit comments

Comments
 (0)