Merge pull request #426 from Amanieu/fix_wasi_build

Fix build on targets with fewer than 3 components in their name
This commit is contained in:
Amanieu d'Antras 2021-06-04 00:20:16 +01:00 committed by GitHub
commit 5eaea30d9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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")
}