about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-08 09:13:19 -0700
committerbors <bors@rust-lang.org>2016-05-08 09:13:19 -0700
commitebe6da34ffc72a701f4189ef7be5ab2c1cb6e8c9 (patch)
tree0cdeaf3f9180cf5db5dde4489d2b7139f331d21f /src/bootstrap
parentcae42a471c13eec8a6470d0845f46f1606d50742 (diff)
parentca03b81abb62b12853d9e0133765355dc6958c59 (diff)
Auto merge of #33414 - Nercury:master, r=alexcrichton
Add armv7-linux-androideabi target

This PR adds `armv7-linux-androideabi` target that matches `armeabi-v7a` Android ABI, ~~downscales `arm-linux-androideabi` target to match `armeabi` Android ABI~~ (TBD later if needed).

This should allow us to get the best performance from every [Android ABI level](http://developer.android.com/ndk/guides/abis.html).

Currently existing target `arm-linux-androideabi` started gaining features out of the supported range of [android `armeabi`](http://developer.android.com/ndk/guides/abis.html). While android compiler does not use a different target for later supported `armv7` architecture, it has distinct ABI name `armeabi-v7a`. We decided to add rust target `armv7-linux-androideabi` to match it.

Note that `NEON`, `VFPv3-D32`, and `ThumbEE` instruction sets are not added, because not all android devices are guaranteed to support all or some of these, and [their availability should be checked at runtime](http://developer.android.com/ndk/guides/abis.html#v7a).

~~This reduces performance of existing `arm-linux-androideabi` and may make it _much_ slower (we are talking more than order of magnitude in some random ad-hoc fp benchmark that I did).~~

Part of #33278.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/build/config.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/build/config.rs b/src/bootstrap/build/config.rs
index 98fdaae64a5..5c4feebedb4 100644
--- a/src/bootstrap/build/config.rs
+++ b/src/bootstrap/build/config.rs
@@ -338,6 +338,12 @@ impl Config {
                                      .or_insert(Target::default());
                     target.ndk = Some(PathBuf::from(value));
                 }
+                "CFG_ARMV7_LINUX_ANDROIDEABI_NDK" if value.len() > 0 => {
+                    let target = "armv7-linux-androideabi".to_string();
+                    let target = self.target_config.entry(target)
+                                     .or_insert(Target::default());
+                    target.ndk = Some(PathBuf::from(value));
+                }
                 "CFG_I686_LINUX_ANDROID_NDK" if value.len() > 0 => {
                     let target = "i686-linux-androideabi".to_string();
                     let target = self.target_config.entry(target)