]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/aarch64_linux_android.rs
Added docs to internal_macro const
[rust.git] / compiler / rustc_target / src / spec / aarch64_linux_android.rs
1 use crate::spec::{SanitizerSet, Target, TargetOptions};
2
3 // See https://developer.android.com/ndk/guides/abis.html#arm64-v8a
4 // for target ABI requirements.
5
6 pub fn target() -> Target {
7     Target {
8         llvm_target: "aarch64-linux-android".to_string(),
9         pointer_width: 64,
10         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
11         arch: "aarch64".to_string(),
12         options: TargetOptions {
13             max_atomic_width: Some(128),
14             // As documented in https://developer.android.com/ndk/guides/cpu-features.html
15             // the neon (ASIMD) and FP must exist on all android aarch64 targets.
16             features: "+neon,+fp-armv8".to_string(),
17             supported_sanitizers: SanitizerSet::HWADDRESS,
18             ..super::android_base::opts()
19         },
20     }
21 }