File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ fn main() {
1717 return ;
1818 }
1919
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
2121 // provide them.
22- if target. contains ( "wasm32" ) {
22+ if target. contains ( "wasm32" ) || target . contains ( "sgx" ) {
2323 println ! ( "cargo:rustc-cfg=feature=\" mem\" " ) ;
2424 }
2525
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ pub mod int;
4848pub mod float;
4949
5050#[ 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" ) ) ]
5253pub mod math;
5354pub mod mem;
5455
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ macro_rules! no_mangle {
1515}
1616
1717// 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 ") ) ]
1919no_mangle ! {
2020 fn acos( x: f64 ) -> f64 ;
2121 fn asin( x: f64 ) -> f64 ;
You can’t perform that action at this time.
0 commit comments