Browse Source

Merge pull request #426 from Amanieu/fix_wasi_build

Fix build on targets with fewer than 3 components in their name
Amanieu d'Antras 3 years ago
parent
commit
a065660883
1 changed files with 3 additions and 1 deletions
  1. 3 1
      build.rs

+ 3 - 1
build.rs

@@ -72,7 +72,9 @@ fn main() {
     // Only emit the ARM Linux atomic emulation on pre-ARMv6 architectures. This
     // includes the old androideabi. It is deprecated but it is available as a
     // rustc target (arm-linux-androideabi).
-    if llvm_target[0] == "armv4t" || llvm_target[0] == "armv5te" || llvm_target[2] == "androideabi"
+    if llvm_target[0] == "armv4t"
+        || llvm_target[0] == "armv5te"
+        || llvm_target.get(2) == Some(&"androideabi")
     {
         println!("cargo:rustc-cfg=kernel_user_helpers")
     }