Merge pull request #277 from alexcrichton/less-wasi-sysm

Don't compile math symbols on wasm32-unknown-wasi
master
Alex Crichton 2019-04-02 14:44:24 -05:00 committed by GitHub
commit cc7567e471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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(all(target_arch = "wasm32", target_os = "unknown"),
all(target_vendor = "fortanix", target_env = "sgx")))]
#[cfg(any(
all(
target_arch = "wasm32",
target_os = "unknown",
not(target_env = "wasi")
),
all(target_vendor = "fortanix", target_env = "sgx")
))]
no_mangle! {
fn acos(x: f64) -> f64;
fn asin(x: f64) -> f64;