33
44use core:: intrinsics;
55
6- // iOS symbols have a leading underscore.
7- #[ cfg( target_os = "ios " ) ]
6+ // Apple symbols have a leading underscore.
7+ #[ cfg( target_vendor = "apple " ) ]
88macro_rules! bl {
99 ( $func: literal) => {
1010 concat!( "bl _" , $func)
1111 } ;
1212}
13- #[ cfg( not( target_os = "ios " ) ) ]
13+ #[ cfg( not( target_vendor = "apple " ) ) ]
1414macro_rules! bl {
1515 ( $func: literal) => {
1616 concat!( "bl " , $func)
@@ -82,12 +82,12 @@ intrinsics! {
8282
8383 // FIXME: The `*4` and `*8` variants should be defined as aliases.
8484
85- #[ cfg( not( target_os = "ios " ) ) ]
85+ #[ cfg( not( target_vendor = "apple " ) ) ]
8686 pub unsafe extern "aapcs" fn __aeabi_memcpy( dest: * mut u8 , src: * const u8 , n: usize ) {
8787 crate :: mem:: memcpy( dest, src, n) ;
8888 }
8989
90- #[ cfg( not( target_os = "ios " ) ) ]
90+ #[ cfg( not( target_vendor = "apple " ) ) ]
9191 pub unsafe extern "aapcs" fn __aeabi_memcpy4( dest: * mut u8 , src: * const u8 , n: usize ) {
9292 // We are guaranteed 4-alignment, so accessing at u32 is okay.
9393 let mut dest = dest as * mut u32 ;
@@ -104,33 +104,33 @@ intrinsics! {
104104 __aeabi_memcpy( dest as * mut u8 , src as * const u8 , n) ;
105105 }
106106
107- #[ cfg( not( target_os = "ios " ) ) ]
107+ #[ cfg( not( target_vendor = "apple " ) ) ]
108108 pub unsafe extern "aapcs" fn __aeabi_memcpy8( dest: * mut u8 , src: * const u8 , n: usize ) {
109109 __aeabi_memcpy4( dest, src, n) ;
110110 }
111111
112- #[ cfg( not( target_os = "ios " ) ) ]
112+ #[ cfg( not( target_vendor = "apple " ) ) ]
113113 pub unsafe extern "aapcs" fn __aeabi_memmove( dest: * mut u8 , src: * const u8 , n: usize ) {
114114 crate :: mem:: memmove( dest, src, n) ;
115115 }
116116
117- #[ cfg( not( any( target_os = "ios " , target_env = "msvc" ) ) ) ]
117+ #[ cfg( not( any( target_vendor = "apple " , target_env = "msvc" ) ) ) ]
118118 pub unsafe extern "aapcs" fn __aeabi_memmove4( dest: * mut u8 , src: * const u8 , n: usize ) {
119119 __aeabi_memmove( dest, src, n) ;
120120 }
121121
122- #[ cfg( not( any( target_os = "ios " , target_env = "msvc" ) ) ) ]
122+ #[ cfg( not( any( target_vendor = "apple " , target_env = "msvc" ) ) ) ]
123123 pub unsafe extern "aapcs" fn __aeabi_memmove8( dest: * mut u8 , src: * const u8 , n: usize ) {
124124 __aeabi_memmove( dest, src, n) ;
125125 }
126126
127- #[ cfg( not( target_os = "ios " ) ) ]
127+ #[ cfg( not( target_vendor = "apple " ) ) ]
128128 pub unsafe extern "aapcs" fn __aeabi_memset( dest: * mut u8 , n: usize , c: i32 ) {
129129 // Note the different argument order
130130 crate :: mem:: memset( dest, c, n) ;
131131 }
132132
133- #[ cfg( not( target_os = "ios " ) ) ]
133+ #[ cfg( not( target_vendor = "apple " ) ) ]
134134 pub unsafe extern "aapcs" fn __aeabi_memset4( dest: * mut u8 , n: usize , c: i32 ) {
135135 let mut dest = dest as * mut u32 ;
136136 let mut n = n;
@@ -147,22 +147,22 @@ intrinsics! {
147147 __aeabi_memset( dest as * mut u8 , n, byte as i32 ) ;
148148 }
149149
150- #[ cfg( not( target_os = "ios " ) ) ]
150+ #[ cfg( not( target_vendor = "apple " ) ) ]
151151 pub unsafe extern "aapcs" fn __aeabi_memset8( dest: * mut u8 , n: usize , c: i32 ) {
152152 __aeabi_memset4( dest, n, c) ;
153153 }
154154
155- #[ cfg( not( target_os = "ios " ) ) ]
155+ #[ cfg( not( target_vendor = "apple " ) ) ]
156156 pub unsafe extern "aapcs" fn __aeabi_memclr( dest: * mut u8 , n: usize ) {
157157 __aeabi_memset( dest, n, 0 ) ;
158158 }
159159
160- #[ cfg( not( any( target_os = "ios " , target_env = "msvc" ) ) ) ]
160+ #[ cfg( not( any( target_vendor = "apple " , target_env = "msvc" ) ) ) ]
161161 pub unsafe extern "aapcs" fn __aeabi_memclr4( dest: * mut u8 , n: usize ) {
162162 __aeabi_memset4( dest, n, 0 ) ;
163163 }
164164
165- #[ cfg( not( any( target_os = "ios " , target_env = "msvc" ) ) ) ]
165+ #[ cfg( not( any( target_vendor = "apple " , target_env = "msvc" ) ) ) ]
166166 pub unsafe extern "aapcs" fn __aeabi_memclr8( dest: * mut u8 , n: usize ) {
167167 __aeabi_memset4( dest, n, 0 ) ;
168168 }
0 commit comments