Add armv7-linux-androideabi target.

This commit is contained in:
Nerijus Arlauskas 2016-05-05 01:08:14 +03:00
parent a9cc5b097e
commit b6fc4abe44
6 changed files with 73 additions and 1 deletions

View file

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

View file

@ -98,6 +98,7 @@ unofficial locations.
| Target | std |rustc|cargo| notes |
|-------------------------------|-----|-----|-----|----------------------------|
| `aarch64-linux-android` | ✓ | | | ARM64 Android |
| `armv7-linux-androideabi` | ✓ | | | ARM-v7a Android |
| `i686-linux-android` | ✓ | | | 32-bit x86 Android |
| `i686-pc-windows-msvc` (XP) | ✓ | | | Windows XP support |
| `i686-unknown-freebsd` | ✓ | ✓ | ✓ | 32-bit FreeBSD |

View file

@ -0,0 +1,28 @@
// Copyright 2014 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 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use target::Target;
pub fn target() -> Target {
let mut base = super::android_base::opts();
base.features = "+v7,+thumb2,+vfp3,+d16".to_string();
Target {
llvm_target: "armv7-none-linux-android".to_string(),
target_endian: "little".to_string(),
target_pointer_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: "gnu".to_string(),
target_vendor: "unknown".to_string(),
options: base,
}
}

View file

@ -107,6 +107,7 @@ supported_targets! {
("i686-linux-android", i686_linux_android),
("arm-linux-androideabi", arm_linux_androideabi),
("armv7-linux-androideabi", armv7_linux_androideabi),
("aarch64-linux-android", aarch64_linux_android),
("i686-unknown-freebsd", i686_unknown_freebsd),