Fix SGX target_env collision

Signed-off-by: Yu Ding <dingelish@gmail.com>
This commit is contained in:
Yu Ding
2019-01-03 12:53:08 -08:00
parent b549e21009
commit c5dc23d75d
3 changed files with 6 additions and 4 deletions

View File

@@ -15,7 +15,8 @@ macro_rules! no_mangle {
}
// only for the wasm32-unknown-unknown target
#[cfg(any(all(target_arch = "wasm32", target_os = "unknown"), target_env = "sgx"))]
#[cfg(any(all(target_arch = "wasm32", target_os = "unknown"),
all(target_vendor = "fortanix", target_env = "sgx")))]
no_mangle! {
fn acos(x: f64) -> f64;
fn asin(x: f64) -> f64;
@@ -66,7 +67,7 @@ no_mangle! {
fn tanhf(n: f32) -> f32;
}
#[cfg(target_env = "sgx")]
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
no_mangle! {
fn ceil(x: f64) -> f64;
fn ceilf(x: f32) -> f32;