about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorHenri Sivonen <hsivonen@hsivonen.fi>2018-06-04 11:44:30 +0300
committerHenri Sivonen <hsivonen@hsivonen.fi>2018-12-13 19:21:27 +0200
commit0fbe382f0ff20347292f0cce4683aaa73000ae97 (patch)
tree99b33dea1b99bbca49d5b0159a6774502c762e0e /src/bootstrap
parent9fe5cb5342244a716055fa0162e795deabd4985c (diff)
downloadrust-0fbe382f0ff20347292f0cce4683aaa73000ae97.tar.gz
rust-0fbe382f0ff20347292f0cce4683aaa73000ae97.zip
Add targets thumbv7neon-linux-androideabi and thumbv7neon-unknown-linux-gnueabihf
These two targets enable both thumb-mode and NEON for ARMv7 CPUs.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/cc_detect.rs5
-rwxr-xr-xsrc/bootstrap/configure.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
index d5da0cabec8..836a37c58a1 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 5467c9f9d5b..f2473cb9eda 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -107,6 +107,8 @@ v("arm-linux-androideabi-ndk", "target.arm-linux-androideabi.android-ndk",
   "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",