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() {
22
22
23
23
// Forcibly enable memory intrinsics on wasm32 & SGX as we don't have a libc to
24
24
// provide them.
25
- if target. contains ( "wasm32" ) || target. contains ( "sgx" ) {
25
+ if target. contains ( "wasm32" ) || ( target. contains ( "sgx" ) && target . contains ( "fortanix" ) ) {
26
26
println ! ( "cargo:rustc-cfg=feature=\" mem\" " ) ;
27
27
}
28
28
Original file line number Diff line number Diff line change 16
16
#![ feature( abi_unadjusted) ]
17
17
#![ feature( linkage) ]
18
18
#![ feature( lang_items) ]
19
+ #![ feature( cfg_target_vendor) ]
19
20
#![ allow( unused_features) ]
20
21
#![ no_builtins]
21
22
#![ cfg_attr( feature = "compiler-builtins" , feature( staged_api) ) ]
@@ -49,7 +50,7 @@ pub mod float;
49
50
50
51
#[ cfg( any( all( target_arch = "wasm32" , target_os = "unknown" ) ,
51
52
all( target_arch = "arm" , target_os = "none" ) ,
52
- target_env = "sgx" ) ) ]
53
+ all ( target_vendor = "fortanix" , target_env = "sgx" ) ) ) ]
53
54
pub mod math;
54
55
pub mod mem;
55
56
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ macro_rules! no_mangle {
15
15
}
16
16
17
17
// 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" ) ) ) ]
19
20
no_mangle ! {
20
21
fn acos( x: f64 ) -> f64 ;
21
22
fn asin( x: f64 ) -> f64 ;
@@ -66,7 +67,7 @@ no_mangle! {
66
67
fn tanhf( n: f32 ) -> f32 ;
67
68
}
68
69
69
- #[ cfg( target_env = "sgx" ) ]
70
+ #[ cfg( all ( target_vendor = "fortanix" , target_env = "sgx" ) ) ]
70
71
no_mangle ! {
71
72
fn ceil( x: f64 ) -> f64 ;
72
73
fn ceilf( x: f32 ) -> f32 ;
You can’t perform that action at this time.
0 commit comments