Add SGX target
This commit is contained in:
parent
6582b145b8
commit
3880e404a8
3 changed files with 5 additions and 4 deletions
|
|
@ -17,9 +17,9 @@ fn main() {
|
|||
return;
|
||||
}
|
||||
|
||||
// Forcibly enable memory intrinsics on wasm32 as we don't have a libc to
|
||||
// Forcibly enable memory intrinsics on wasm32 & SGX as we don't have a libc to
|
||||
// provide them.
|
||||
if target.contains("wasm32") {
|
||||
if target.contains("wasm32") || target.contains("sgx") {
|
||||
println!("cargo:rustc-cfg=feature=\"mem\"");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ pub mod int;
|
|||
pub mod float;
|
||||
|
||||
#[cfg(any(all(target_arch = "wasm32", target_os = "unknown"),
|
||||
all(target_arch = "arm", target_os = "none")))]
|
||||
all(target_arch = "arm", target_os = "none"),
|
||||
target_env = "sgx"))]
|
||||
pub mod math;
|
||||
pub mod mem;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ macro_rules! no_mangle {
|
|||
}
|
||||
|
||||
// only for the wasm32-unknown-unknown target
|
||||
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
|
||||
#[cfg(any(all(target_arch = "wasm32", target_os = "unknown"), target_env = "sgx"))]
|
||||
no_mangle! {
|
||||
fn acos(x: f64) -> f64;
|
||||
fn asin(x: f64) -> f64;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue