File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ fn main() {
17
17
return ;
18
18
}
19
19
20
- // Forcibly enable memory intrinsics on wasm32 as we don't have a libc to
20
+ // Forcibly enable memory intrinsics on wasm32 & SGX as we don't have a libc to
21
21
// provide them.
22
- if target. contains ( "wasm32" ) {
22
+ if target. contains ( "wasm32" ) || target . contains ( "sgx" ) {
23
23
println ! ( "cargo:rustc-cfg=feature=\" mem\" " ) ;
24
24
}
25
25
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ pub mod int;
48
48
pub mod float;
49
49
50
50
#[ cfg( any( all( target_arch = "wasm32" , target_os = "unknown" ) ,
51
- all( target_arch = "arm" , target_os = "none" ) ) ) ]
51
+ all( target_arch = "arm" , target_os = "none" ) ,
52
+ target_env = "sgx" ) ) ]
52
53
pub mod math;
53
54
pub mod mem;
54
55
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ macro_rules! no_mangle {
15
15
}
16
16
17
17
// only for the wasm32-unknown-unknown target
18
- #[ cfg( all( target_arch = "wasm32" , target_os = "unknown" ) ) ]
18
+ #[ cfg( any ( all( target_arch = "wasm32" , target_os = "unknown" ) , target_env = "sgx ") ) ]
19
19
no_mangle ! {
20
20
fn acos( x: f64 ) -> f64 ;
21
21
fn asin( x: f64 ) -> f64 ;
You can’t perform that action at this time.
0 commit comments