Fix build on targets with fewer than 3 components in their name

This commit is contained in:
Amanieu d'Antras 2021-06-03 22:59:34 +01:00
parent da6b017a73
commit 77d9a28bbb

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