3
3
4
4
use core:: intrinsics;
5
5
6
- // iOS symbols have a leading underscore.
7
- #[ cfg( target_os = "ios " ) ]
6
+ // Apple symbols have a leading underscore.
7
+ #[ cfg( target_vendor = "apple " ) ]
8
8
macro_rules! bl {
9
9
( $func: literal) => {
10
10
concat!( "bl _" , $func)
11
11
} ;
12
12
}
13
- #[ cfg( not( target_os = "ios " ) ) ]
13
+ #[ cfg( not( target_vendor = "apple " ) ) ]
14
14
macro_rules! bl {
15
15
( $func: literal) => {
16
16
concat!( "bl " , $func)
@@ -82,12 +82,12 @@ intrinsics! {
82
82
83
83
// FIXME: The `*4` and `*8` variants should be defined as aliases.
84
84
85
- #[ cfg( not( target_os = "ios " ) ) ]
85
+ #[ cfg( not( target_vendor = "apple " ) ) ]
86
86
pub unsafe extern "aapcs" fn __aeabi_memcpy( dest: * mut u8 , src: * const u8 , n: usize ) {
87
87
crate :: mem:: memcpy( dest, src, n) ;
88
88
}
89
89
90
- #[ cfg( not( target_os = "ios " ) ) ]
90
+ #[ cfg( not( target_vendor = "apple " ) ) ]
91
91
pub unsafe extern "aapcs" fn __aeabi_memcpy4( dest: * mut u8 , src: * const u8 , n: usize ) {
92
92
// We are guaranteed 4-alignment, so accessing at u32 is okay.
93
93
let mut dest = dest as * mut u32 ;
@@ -104,33 +104,33 @@ intrinsics! {
104
104
__aeabi_memcpy( dest as * mut u8 , src as * const u8 , n) ;
105
105
}
106
106
107
- #[ cfg( not( target_os = "ios " ) ) ]
107
+ #[ cfg( not( target_vendor = "apple " ) ) ]
108
108
pub unsafe extern "aapcs" fn __aeabi_memcpy8( dest: * mut u8 , src: * const u8 , n: usize ) {
109
109
__aeabi_memcpy4( dest, src, n) ;
110
110
}
111
111
112
- #[ cfg( not( target_os = "ios " ) ) ]
112
+ #[ cfg( not( target_vendor = "apple " ) ) ]
113
113
pub unsafe extern "aapcs" fn __aeabi_memmove( dest: * mut u8 , src: * const u8 , n: usize ) {
114
114
crate :: mem:: memmove( dest, src, n) ;
115
115
}
116
116
117
- #[ cfg( not( any( target_os = "ios " , target_env = "msvc" ) ) ) ]
117
+ #[ cfg( not( any( target_vendor = "apple " , target_env = "msvc" ) ) ) ]
118
118
pub unsafe extern "aapcs" fn __aeabi_memmove4( dest: * mut u8 , src: * const u8 , n: usize ) {
119
119
__aeabi_memmove( dest, src, n) ;
120
120
}
121
121
122
- #[ cfg( not( any( target_os = "ios " , target_env = "msvc" ) ) ) ]
122
+ #[ cfg( not( any( target_vendor = "apple " , target_env = "msvc" ) ) ) ]
123
123
pub unsafe extern "aapcs" fn __aeabi_memmove8( dest: * mut u8 , src: * const u8 , n: usize ) {
124
124
__aeabi_memmove( dest, src, n) ;
125
125
}
126
126
127
- #[ cfg( not( target_os = "ios " ) ) ]
127
+ #[ cfg( not( target_vendor = "apple " ) ) ]
128
128
pub unsafe extern "aapcs" fn __aeabi_memset( dest: * mut u8 , n: usize , c: i32 ) {
129
129
// Note the different argument order
130
130
crate :: mem:: memset( dest, c, n) ;
131
131
}
132
132
133
- #[ cfg( not( target_os = "ios " ) ) ]
133
+ #[ cfg( not( target_vendor = "apple " ) ) ]
134
134
pub unsafe extern "aapcs" fn __aeabi_memset4( dest: * mut u8 , n: usize , c: i32 ) {
135
135
let mut dest = dest as * mut u32 ;
136
136
let mut n = n;
@@ -147,22 +147,22 @@ intrinsics! {
147
147
__aeabi_memset( dest as * mut u8 , n, byte as i32 ) ;
148
148
}
149
149
150
- #[ cfg( not( target_os = "ios " ) ) ]
150
+ #[ cfg( not( target_vendor = "apple " ) ) ]
151
151
pub unsafe extern "aapcs" fn __aeabi_memset8( dest: * mut u8 , n: usize , c: i32 ) {
152
152
__aeabi_memset4( dest, n, c) ;
153
153
}
154
154
155
- #[ cfg( not( target_os = "ios " ) ) ]
155
+ #[ cfg( not( target_vendor = "apple " ) ) ]
156
156
pub unsafe extern "aapcs" fn __aeabi_memclr( dest: * mut u8 , n: usize ) {
157
157
__aeabi_memset( dest, n, 0 ) ;
158
158
}
159
159
160
- #[ cfg( not( any( target_os = "ios " , target_env = "msvc" ) ) ) ]
160
+ #[ cfg( not( any( target_vendor = "apple " , target_env = "msvc" ) ) ) ]
161
161
pub unsafe extern "aapcs" fn __aeabi_memclr4( dest: * mut u8 , n: usize ) {
162
162
__aeabi_memset4( dest, n, 0 ) ;
163
163
}
164
164
165
- #[ cfg( not( any( target_os = "ios " , target_env = "msvc" ) ) ) ]
165
+ #[ cfg( not( any( target_vendor = "apple " , target_env = "msvc" ) ) ) ]
166
166
pub unsafe extern "aapcs" fn __aeabi_memclr8( dest: * mut u8 , n: usize ) {
167
167
__aeabi_memset4( dest, n, 0 ) ;
168
168
}
0 commit comments