Skip to content

Commit 6fff4d9

Browse files
authored
Rollup merge of #101780 - chriswailes:android-platform, r=joshtriplett
Add a platform support document for Android r? ``@joshtriplett``
2 parents e1c28e0 + 7ad0ac7 commit 6fff4d9

File tree

3 files changed

+52
-6
lines changed

3 files changed

+52
-6
lines changed

src/doc/rustc/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [armv6k-nintendo-3ds](platform-support/armv6k-nintendo-3ds.md)
2525
- [armv7-unknown-linux-uclibceabi](platform-support/armv7-unknown-linux-uclibceabi.md)
2626
- [armv7-unknown-linux-uclibceabihf](platform-support/armv7-unknown-linux-uclibceabihf.md)
27+
- [\*-android and \*-androideabi](platform-support/android.md)
2728
- [\*-fuchsia](platform-support/fuchsia.md)
2829
- [\*-kmc-solid_\*](platform-support/kmc-solid.md)
2930
- [m68k-unknown-linux-gnu](platform-support/m68k-unknown-linux-gnu.md)

src/doc/rustc/src/platform-support.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,17 @@ target | std | notes
125125
`aarch64-apple-ios` | ✓ | ARM64 iOS
126126
[`aarch64-apple-ios-sim`](platform-support/aarch64-apple-ios-sim.md) | ✓ | Apple iOS Simulator on ARM64
127127
`aarch64-fuchsia` | ✓ | ARM64 Fuchsia
128-
`aarch64-linux-android` | ✓ | ARM64 Android
128+
[`aarch64-linux-android`](platform-support/android.md) | ✓ | ARM64 Android
129129
`aarch64-unknown-none-softfloat` | * | Bare ARM64, softfloat
130130
`aarch64-unknown-none` | * | Bare ARM64, hardfloat
131-
`arm-linux-androideabi` | ✓ | ARMv7 Android
131+
[`arm-linux-androideabi`](platform-support/android.md) | ✓ | ARMv7 Android
132132
`arm-unknown-linux-musleabi` | ✓ | ARMv6 Linux with MUSL
133133
`arm-unknown-linux-musleabihf` | ✓ | ARMv6 Linux with MUSL, hardfloat
134134
`armebv7r-none-eabi` | * | Bare ARMv7-R, Big Endian
135135
`armebv7r-none-eabihf` | * | Bare ARMv7-R, Big Endian, hardfloat
136136
`armv5te-unknown-linux-gnueabi` | ✓ | ARMv5TE Linux (kernel 4.4, glibc 2.23)
137137
`armv5te-unknown-linux-musleabi` | ✓ | ARMv5TE Linux with MUSL
138-
`armv7-linux-androideabi` | ✓ | ARMv7a Android
138+
[`armv7-linux-androideabi`](platform-support/android.md) | ✓ | ARMv7a Android
139139
`armv7-unknown-linux-gnueabi` | ✓ |ARMv7 Linux (kernel 4.15, glibc 2.27)
140140
`armv7-unknown-linux-musleabi` | ✓ |ARMv7 Linux with MUSL
141141
`armv7-unknown-linux-musleabihf` | ✓ | ARMv7 Linux with MUSL, hardfloat
@@ -146,7 +146,7 @@ target | std | notes
146146
`i586-pc-windows-msvc` | * | 32-bit Windows w/o SSE
147147
`i586-unknown-linux-gnu` | ✓ | 32-bit Linux w/o SSE (kernel 4.4, glibc 2.23)
148148
`i586-unknown-linux-musl` | ✓ | 32-bit Linux w/o SSE, MUSL
149-
`i686-linux-android` | ✓ | 32-bit x86 Android
149+
[`i686-linux-android`](platform-support/android.md) | ✓ | 32-bit x86 Android
150150
`i686-unknown-freebsd` | ✓ | 32-bit FreeBSD
151151
`i686-unknown-linux-musl` | ✓ | 32-bit Linux with MUSL
152152
`mips-unknown-linux-musl` | ✓ | MIPS Linux with MUSL
@@ -165,7 +165,7 @@ target | std | notes
165165
`thumbv7em-none-eabi` | * | Bare Cortex-M4, M7
166166
`thumbv7em-none-eabihf` | * | Bare Cortex-M4F, M7F, FPU, hardfloat
167167
`thumbv7m-none-eabi` | * | Bare Cortex-M3
168-
`thumbv7neon-linux-androideabi` | ✓ | Thumb2-mode ARMv7a Android with NEON
168+
[`thumbv7neon-linux-androideabi`](platform-support/android.md) | ✓ | Thumb2-mode ARMv7a Android with NEON
169169
`thumbv7neon-unknown-linux-gnueabihf` | ✓ | Thumb2-mode ARMv7a Linux with NEON (kernel 4.4, glibc 2.23)
170170
`thumbv8m.base-none-eabi` | * | ARMv8-M Baseline
171171
`thumbv8m.main-none-eabi` | * | ARMv8-M Mainline
@@ -176,7 +176,7 @@ target | std | notes
176176
`x86_64-apple-ios` | ✓ | 64-bit x86 iOS
177177
[`x86_64-fortanix-unknown-sgx`](platform-support/x86_64-fortanix-unknown-sgx.md) | ✓ | [Fortanix ABI] for 64-bit Intel SGX
178178
`x86_64-fuchsia` | ✓ | 64-bit Fuchsia
179-
`x86_64-linux-android` | ✓ | 64-bit x86 Android
179+
[`x86_64-linux-android`](platform-support/android.md) | ✓ | 64-bit x86 Android
180180
`x86_64-pc-solaris` | ✓ | 64-bit Solaris 10/11, illumos
181181
`x86_64-unknown-linux-gnux32` | ✓ | 64-bit Linux (x32 ABI) (kernel 4.15, glibc 2.27)
182182
[`x86_64-unknown-none`](platform-support/x86_64-unknown-none.md) | * | Freestanding/bare-metal x86_64, softfloat
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# *-linux-android and *-linux-androideabi
2+
3+
**Tier: 2**
4+
5+
[Android] is a mobile operating system built on top of the Linux kernel.
6+
7+
[Android]: https://source.android.com/
8+
9+
## Target maintainers
10+
11+
- Chris Wailes ([@chriswailes](https://github.com/chriswailes))
12+
- Matthew Maurer ([@maurer](https://github.com/maurer))
13+
- Martin Geisler ([@mgeisler](https://github.com/mgeisler))
14+
15+
## Requirements
16+
17+
This target is cross-compiled from a host environment. Development may be done
18+
from the [source tree] or using the Android NDK.
19+
20+
[source tree]: https://source.android.com/docs/setup/build/downloading
21+
22+
Android targets support std. Generated binaries use the ELF file format.
23+
24+
## NDK/API Update Policy
25+
26+
Rust will support the most recent Long Term Support (LTS) Android Native
27+
Development Kit (NDK). By default Rust will support all API levels supported
28+
by the NDK, but a higher minimum API level may be required if deemed necessary.
29+
30+
## Building the target
31+
32+
To build Rust binaries for Android you'll need a copy of the most recent LTS
33+
edition of the [Android NDK]. Supported Android targets are:
34+
35+
* aarch64-linux-android
36+
* arm-linux-androideabi
37+
* armv7-linux-androideabi
38+
* i686-linux-android
39+
* thumbv7neon-linux-androideabi
40+
* x86_64-linux-android
41+
42+
[Android NDK]: https://developer.android.com/ndk/downloads
43+
44+
A list of all supported targets can be found
45+
[here](https://doc.rust-lang.org/rustc/platform-support.html)

0 commit comments

Comments
 (0)