Don't compile math symbols on wasm32-unknown-wasi

These are already provided by the C sysroot, so no need for us to
duplicate them!
This commit is contained in:
Alex Crichton 2019-04-02 07:46:06 -07:00
parent a4420e66ad
commit e95ef7a5ef
1 changed files with 8 additions and 3 deletions

View File

@ -14,9 +14,14 @@ macro_rules! no_mangle {
} }
} }
// only for the wasm32-unknown-unknown target #[cfg(any(
#[cfg(any(all(target_arch = "wasm32", target_os = "unknown"), all(
all(target_vendor = "fortanix", target_env = "sgx")))] target_arch = "wasm32",
target_os = "unknown",
not(target_env = "wasi")
),
all(target_vendor = "fortanix", target_env = "sgx")
))]
no_mangle! { no_mangle! {
fn acos(x: f64) -> f64; fn acos(x: f64) -> f64;
fn asin(x: f64) -> f64; fn asin(x: f64) -> f64;