File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ fn main() {
2222
2323 // Forcibly enable memory intrinsics on wasm32 & SGX as we don't have a libc to
2424 // provide them.
25- if target. contains ( "wasm32" ) || target. contains ( "sgx" ) {
25+ if target. contains ( "wasm32" ) || ( target. contains ( "sgx" ) && target . contains ( "fortanix" ) ) {
2626 println ! ( "cargo:rustc-cfg=feature=\" mem\" " ) ;
2727 }
2828
Original file line number Diff line number Diff line change 1616#![ feature( abi_unadjusted) ]
1717#![ feature( linkage) ]
1818#![ feature( lang_items) ]
19+ #![ feature( cfg_target_vendor) ]
1920#![ allow( unused_features) ]
2021#![ no_builtins]
2122#![ cfg_attr( feature = "compiler-builtins" , feature( staged_api) ) ]
@@ -49,7 +50,7 @@ pub mod float;
4950
5051#[ cfg( any( all( target_arch = "wasm32" , target_os = "unknown" ) ,
5152 all( target_arch = "arm" , target_os = "none" ) ,
52- target_env = "sgx" ) ) ]
53+ all ( target_vendor = "fortanix" , target_env = "sgx" ) ) ) ]
5354pub mod math;
5455pub mod mem;
5556
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ macro_rules! no_mangle {
1515}
1616
1717// only for the wasm32-unknown-unknown target
18- #[ cfg( any( all( target_arch = "wasm32" , target_os = "unknown" ) , target_env = "sgx" ) ) ]
18+ #[ cfg( any( all( target_arch = "wasm32" , target_os = "unknown" ) ,
19+ all( target_vendor = "fortanix" , target_env = "sgx" ) ) ) ]
1920no_mangle ! {
2021 fn acos( x: f64 ) -> f64 ;
2122 fn asin( x: f64 ) -> f64 ;
@@ -66,7 +67,7 @@ no_mangle! {
6667 fn tanhf( n: f32 ) -> f32 ;
6768}
6869
69- #[ cfg( target_env = "sgx" ) ]
70+ #[ cfg( all ( target_vendor = "fortanix" , target_env = "sgx" ) ) ]
7071no_mangle ! {
7172 fn ceil( x: f64 ) -> f64 ;
7273 fn ceilf( x: f32 ) -> f32 ;
You can’t perform that action at this time.
0 commit comments