Переглянути джерело

Use more concise directives

Alex Crichton 3 роки тому
батько
коміт
cb06f58efc
2 змінених файлів з 3 додано та 4 видалено
  1. 1 2
      src/lib.rs
  2. 2 2
      src/math.rs

+ 1 - 2
src/lib.rs

@@ -39,8 +39,7 @@ pub mod float;
 pub mod int;
 
 #[cfg(any(
-    all(target_arch = "wasm32", target_os = "unknown"),
-    all(target_arch = "wasm64", target_os = "unknown"),
+    all(target_family = "wasm", target_os = "unknown"),
     all(target_arch = "x86_64", target_os = "uefi"),
     all(target_arch = "arm", target_os = "none"),
     all(target_vendor = "fortanix", target_env = "sgx")

+ 2 - 2
src/math.rs

@@ -16,7 +16,7 @@ macro_rules! no_mangle {
 
 #[cfg(any(
     all(
-        any(target_arch = "wasm32", target_arch = "wasm64"),
+        target_family = "wasm",
         target_os = "unknown",
         not(target_env = "wasi")
     ),
@@ -66,7 +66,7 @@ no_mangle! {
 
 #[cfg(any(
     all(
-        any(target_arch = "wasm32", target_arch = "wasm64"),
+        target_family = "wasm",
         target_os = "unknown",
         not(target_env = "wasi")
     ),