From 072fdae2e5e57190d4e979b7819cf0b5a47e7aab Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Mon, 4 Jun 2018 11:44:30 +0300 Subject: [PATCH] Add targets thumbv7neon-linux-androideabi and thumbv7neon-unknown-linux-gnueabihf These two targets enable both thumb-mode and NEON for ARMv7 CPUs. --- src/Cargo.lock | 36 +++++++-------- src/bootstrap/cc_detect.rs | 5 ++- src/bootstrap/configure.py | 2 + src/bootstrap/native.rs | 2 + src/ci/docker/dist-android/Dockerfile | 2 + .../spec/armv7_linux_androideabi.rs | 5 +++ .../spec/armv7_unknown_linux_gnueabihf.rs | 3 ++ .../spec/armv7_unknown_linux_musleabihf.rs | 2 + src/librustc_target/spec/mod.rs | 2 + .../spec/thumbv7neon_linux_androideabi.rs | 44 +++++++++++++++++++ .../thumbv7neon_unknown_linux_gnueabihf.rs | 42 ++++++++++++++++++ .../atomic-lock-free/Makefile | 2 + src/tools/build-manifest/src/main.rs | 2 + src/tools/compiletest/src/runtest.rs | 5 ++- 14 files changed, 134 insertions(+), 20 deletions(-) create mode 100644 src/librustc_target/spec/thumbv7neon_linux_androideabi.rs create mode 100644 src/librustc_target/spec/thumbv7neon_unknown_linux_gnueabihf.rs diff --git a/src/Cargo.lock b/src/Cargo.lock index 989655ffb4f5c..58234d87b4a8c 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -20,7 +20,7 @@ name = "alloc_jemalloc" version = "0.0.0" dependencies = [ "build_helper 0.1.0", - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "compiler_builtins 0.0.0", "core 0.0.0", "libc 0.0.0", @@ -112,7 +112,7 @@ name = "backtrace-sys" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -131,7 +131,7 @@ name = "bootstrap" version = "0.0.0" dependencies = [ "build_helper 0.1.0", - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -240,7 +240,7 @@ version = "0.1.0" [[package]] name = "cc" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -356,7 +356,7 @@ name = "cmake" version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -387,7 +387,7 @@ dependencies = [ name = "compiler_builtins" version = "0.0.0" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -564,7 +564,7 @@ name = "curl-sys" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1066,7 +1066,7 @@ name = "libgit2-sys" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", "curl-sys 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1094,7 +1094,7 @@ name = "libz-sys" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1142,7 +1142,7 @@ name = "lzma-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1246,7 +1246,7 @@ name = "miniz-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1356,7 +1356,7 @@ name = "openssl-src" version = "110.0.7+1.1.0i" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1364,7 +1364,7 @@ name = "openssl-sys" version = "0.9.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-src 110.0.7+1.1.0i (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1571,7 +1571,7 @@ dependencies = [ name = "profiler_builtins" version = "0.0.0" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "compiler_builtins 0.0.0", "core 0.0.0", ] @@ -2084,7 +2084,7 @@ dependencies = [ name = "rustc_codegen_llvm" version = "0.0.0" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2217,7 +2217,7 @@ name = "rustc_llvm" version = "0.0.0" dependencies = [ "build_helper 0.1.0", - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2620,7 +2620,7 @@ dependencies = [ "alloc_jemalloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "compiler_builtins 0.0.0", "core 0.0.0", "libc 0.0.0", @@ -3123,7 +3123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32" "checksum byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "74c0b906e9446b0a2e4f760cdb3fa4b2c48cdc6db8766a845c54b6ff063fd2e9" "checksum cargo_metadata 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d6809b327f87369e6f3651efd2c5a96c49847a3ed2559477ecba79014751ee1" -"checksum cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "4a6007c146fdd28d4512a794b07ffe9d8e89e6bf86e2e0c4ddff2e1fb54a0007" +"checksum cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "70f2a88c2e69ceee91c209d8ef25b81fc1a65f42c7f14dfd59d1fed189e514d1" "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" "checksum chalk-engine 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "25ce2f28f55ed544a2a3756b7acf41dd7d6f27acffb2086439950925506af7d0" "checksum chalk-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "295635afd6853aa9f20baeb7f0204862440c0fe994c5a253d5f479dac41d047e" diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs index 698903f128d4d..78d046d1fc23a 100644 --- a/src/bootstrap/cc_detect.rs +++ b/src/bootstrap/cc_detect.rs @@ -143,7 +143,10 @@ fn set_compiler(cfg: &mut cc::Build, // compiler already takes into account the triple in question. t if t.contains("android") => { if let Some(ndk) = config.and_then(|c| c.ndk.as_ref()) { - let target = target.replace("armv7", "arm"); + let target = target.replace("armv7neon", "arm") + .replace("armv7", "arm") + .replace("thumbv7neon", "arm") + .replace("thumbv7", "arm"); let compiler = format!("{}-{}", target, compiler.clang()); cfg.compiler(ndk.join("bin").join(compiler)); } diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index cf7f78eeba04b..2cc3578f1b477 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -105,6 +105,8 @@ def v(*args): "arm-linux-androideabi NDK standalone path") v("armv7-linux-androideabi-ndk", "target.armv7-linux-androideabi.android-ndk", "armv7-linux-androideabi NDK standalone path") +v("thumbv7neon-linux-androideabi-ndk", "target.thumbv7neon-linux-androideabi.android-ndk", + "thumbv7neon-linux-androideabi NDK standalone path") v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", "aarch64-linux-android NDK standalone path") v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk", diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 828a7d14c0437..63d3d9a26e2b6 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -644,7 +644,9 @@ impl Step for Openssl { "arm-unknown-linux-gnueabihf" => "linux-armv4", "armv6-unknown-netbsd-eabihf" => "BSD-generic32", "armv7-linux-androideabi" => "android-armv7", + "thumbv7neon-linux-androideabi" => "android-armv7", "armv7-unknown-linux-gnueabihf" => "linux-armv4", + "thumbv7neon-unknown-linux-gnueabihf" => "linux-armv4", "armv7-unknown-netbsd-eabihf" => "BSD-generic32", "i586-unknown-linux-gnu" => "linux-elf", "i586-unknown-linux-musl" => "linux-elf", diff --git a/src/ci/docker/dist-android/Dockerfile b/src/ci/docker/dist-android/Dockerfile index e00c23dac89b0..a54a2d003b649 100644 --- a/src/ci/docker/dist-android/Dockerfile +++ b/src/ci/docker/dist-android/Dockerfile @@ -16,6 +16,7 @@ RUN . /scripts/android-ndk.sh && \ # env ENV TARGETS=arm-linux-androideabi ENV TARGETS=$TARGETS,armv7-linux-androideabi +ENV TARGETS=$TARGETS,thumbv7neon-linux-androideabi ENV TARGETS=$TARGETS,i686-linux-android ENV TARGETS=$TARGETS,aarch64-linux-android ENV TARGETS=$TARGETS,x86_64-linux-android @@ -24,6 +25,7 @@ ENV RUST_CONFIGURE_ARGS \ --enable-extended \ --arm-linux-androideabi-ndk=/android/ndk/arm-14 \ --armv7-linux-androideabi-ndk=/android/ndk/arm-14 \ + --thumbv7neon-linux-androideabi-ndk=/android/ndk/arm-14 \ --i686-linux-android-ndk=/android/ndk/x86-14 \ --aarch64-linux-android-ndk=/android/ndk/arm64-21 \ --x86_64-linux-android-ndk=/android/ndk/x86_64-21 \ diff --git a/src/librustc_target/spec/armv7_linux_androideabi.rs b/src/librustc_target/spec/armv7_linux_androideabi.rs index 06abe0b2c9e4f..b1bc4df0a16b6 100644 --- a/src/librustc_target/spec/armv7_linux_androideabi.rs +++ b/src/librustc_target/spec/armv7_linux_androideabi.rs @@ -10,6 +10,11 @@ use spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; +// This target if is for the baseline of the Android v7a ABI +// in thumb mode. It's named armv7-* instead of thumbv7-* +// for historical reasons. See the thumbv7neon variant for +// enabling NEON. + // See https://developer.android.com/ndk/guides/abis.html#v7a // for target ABI requirements. diff --git a/src/librustc_target/spec/armv7_unknown_linux_gnueabihf.rs b/src/librustc_target/spec/armv7_unknown_linux_gnueabihf.rs index 14e8fa9dc02a4..5e9a127f2f440 100644 --- a/src/librustc_target/spec/armv7_unknown_linux_gnueabihf.rs +++ b/src/librustc_target/spec/armv7_unknown_linux_gnueabihf.rs @@ -10,6 +10,9 @@ use spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; +// This target is for glibc Linux on ARMv7 without NEON or +// thumb-mode. See the thumbv7neon variant for enabling both. + pub fn target() -> TargetResult { let base = super::linux_base::opts(); Ok(Target { diff --git a/src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs b/src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs index 6e71cb307b997..66aa8d1dfcf1a 100644 --- a/src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs +++ b/src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs @@ -10,6 +10,8 @@ use spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; +// This target is for musl Linux on ARMv7 without thumb-mode or NEON. + pub fn target() -> TargetResult { let base = super::linux_musl_base::opts(); Ok(Target { diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs index 2514909ba75f3..acd0a85a0572a 100644 --- a/src/librustc_target/spec/mod.rs +++ b/src/librustc_target/spec/mod.rs @@ -311,6 +311,7 @@ supported_targets! { ("armv5te-unknown-linux-gnueabi", armv5te_unknown_linux_gnueabi), ("armv5te-unknown-linux-musleabi", armv5te_unknown_linux_musleabi), ("armv7-unknown-linux-gnueabihf", armv7_unknown_linux_gnueabihf), + ("thumbv7neon-unknown-linux-gnueabihf", thumbv7neon_unknown_linux_gnueabihf), ("armv7-unknown-linux-musleabihf", armv7_unknown_linux_musleabihf), ("aarch64-unknown-linux-gnu", aarch64_unknown_linux_gnu), @@ -328,6 +329,7 @@ supported_targets! { ("x86_64-linux-android", x86_64_linux_android), ("arm-linux-androideabi", arm_linux_androideabi), ("armv7-linux-androideabi", armv7_linux_androideabi), + ("thumbv7neon-linux-androideabi", thumbv7neon_linux_androideabi), ("aarch64-linux-android", aarch64_linux_android), ("aarch64-unknown-freebsd", aarch64_unknown_freebsd), diff --git a/src/librustc_target/spec/thumbv7neon_linux_androideabi.rs b/src/librustc_target/spec/thumbv7neon_linux_androideabi.rs new file mode 100644 index 0000000000000..eebbf85400c0b --- /dev/null +++ b/src/librustc_target/spec/thumbv7neon_linux_androideabi.rs @@ -0,0 +1,44 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; + +// This target if is for the Android v7a ABI in thumb mode with +// NEON unconditionally enabled and, therefore, with 32 FPU registers +// enabled as well. See section A2.6.2 on page A2-56 in +// https://static.docs.arm.com/ddi0406/cd/DDI0406C_d_armv7ar_arm.pdf + +// See https://developer.android.com/ndk/guides/abis.html#v7a +// for target ABI requirements. + +pub fn target() -> TargetResult { + let mut base = super::android_base::opts(); + base.features = "+v7,+thumb-mode,+thumb2,+vfp3,+neon".to_string(); + base.max_atomic_width = Some(64); + base.pre_link_args + .get_mut(&LinkerFlavor::Gcc).unwrap().push("-march=armv7-a".to_string()); + + Ok(Target { + llvm_target: "armv7-none-linux-android".to_string(), + target_endian: "little".to_string(), + target_pointer_width: "32".to_string(), + target_c_int_width: "32".to_string(), + data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), + arch: "arm".to_string(), + target_os: "android".to_string(), + target_env: "".to_string(), + target_vendor: "unknown".to_string(), + linker_flavor: LinkerFlavor::Gcc, + options: TargetOptions { + abi_blacklist: super::arm_base::abi_blacklist(), + .. base + }, + }) +} diff --git a/src/librustc_target/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/src/librustc_target/spec/thumbv7neon_unknown_linux_gnueabihf.rs new file mode 100644 index 0000000000000..8e641e2f6eb01 --- /dev/null +++ b/src/librustc_target/spec/thumbv7neon_unknown_linux_gnueabihf.rs @@ -0,0 +1,42 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; + +// This target is for glibc Linux on ARMv7 with thumb mode enabled +// (for consistency with Android and Debian-based distributions) +// and with NEON unconditionally enabled and, therefore, with 32 FPU +// registers enabled as well. See section A2.6.2 on page A2-56 in +// https://static.docs.arm.com/ddi0406/cd/DDI0406C_d_armv7ar_arm.pdf + +pub fn target() -> TargetResult { + let base = super::linux_base::opts(); + Ok(Target { + llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), + target_endian: "little".to_string(), + target_pointer_width: "32".to_string(), + target_c_int_width: "32".to_string(), + data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), + arch: "arm".to_string(), + target_os: "linux".to_string(), + target_env: "gnu".to_string(), + target_vendor: "unknown".to_string(), + linker_flavor: LinkerFlavor::Gcc, + + options: TargetOptions { + // Info about features at https://wiki.debian.org/ArmHardFloatPort + features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".to_string(), + cpu: "generic".to_string(), + max_atomic_width: Some(64), + abi_blacklist: super::arm_base::abi_blacklist(), + .. base + } + }) +} diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile index a7df821f92d71..9e8b4fabf1798 100644 --- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile +++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile @@ -18,6 +18,8 @@ ifeq ($(filter arm,$(LLVM_COMPONENTS)),arm) nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add $(RUSTC) --target=armv7-unknown-linux-gnueabihf atomic_lock_free.rs nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add + $(RUSTC) --target=thumbv7neon-unknown-linux-gnueabihf atomic_lock_free.rs + nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add endif ifeq ($(filter aarch64,$(LLVM_COMPONENTS)),aarch64) $(RUSTC) --target=aarch64-unknown-linux-gnu atomic_lock_free.rs diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index f81964ccbc23c..fc66f8b96edbf 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -60,8 +60,10 @@ static TARGETS: &'static [&'static str] = &[ "armv5te-unknown-linux-musleabi", "armv7-apple-ios", "armv7-linux-androideabi", + "thumbv7neon-linux-androideabi", "armv7-unknown-cloudabi-eabihf", "armv7-unknown-linux-gnueabihf", + "thumbv7neon-unknown-linux-gnueabihf", "armv7-unknown-linux-musleabihf", "armebv7r-none-eabi", "armebv7r-none-eabihf", diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 24b575aae12f9..fe67d9f7a928b 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -167,7 +167,10 @@ pub fn make_diff(expected: &str, actual: &str, context_size: usize) -> Vec) { match &*config.target { - "arm-linux-androideabi" | "armv7-linux-androideabi" | "aarch64-linux-android" => { + "arm-linux-androideabi" + | "armv7-linux-androideabi" + | "thumbv7neon-linux-androideabi" + | "aarch64-linux-android" => { if !config.adb_device_status { panic!("android device not available"); }