Skip to content

Commit e95ef7a

Browse files
committed
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!
1 parent a4420e6 commit e95ef7a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/math.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ macro_rules! no_mangle {
1414
}
1515
}
1616

17-
// only for the wasm32-unknown-unknown target
18-
#[cfg(any(all(target_arch = "wasm32", target_os = "unknown"),
19-
all(target_vendor = "fortanix", target_env = "sgx")))]
17+
#[cfg(any(
18+
all(
19+
target_arch = "wasm32",
20+
target_os = "unknown",
21+
not(target_env = "wasi")
22+
),
23+
all(target_vendor = "fortanix", target_env = "sgx")
24+
))]
2025
no_mangle! {
2126
fn acos(x: f64) -> f64;
2227
fn asin(x: f64) -> f64;

0 commit comments

Comments
 (0)