rustc_target/spec/targets/
aarch64_unknown_uefi.rs

1// This defines the aarch64 target for UEFI systems as described in the UEFI specification. See the
2// uefi-base module for generic UEFI options.
3
4use crate::spec::{LinkerFlavor, Lld, Target, base};
5
6pub(crate) fn target() -> Target {
7    let mut base = base::uefi_msvc::opts();
8
9    base.max_atomic_width = Some(128);
10    base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/machine:arm64"]);
11    base.features = "+v8a".into();
12
13    Target {
14        llvm_target: "aarch64-unknown-windows".into(),
15        metadata: crate::spec::TargetMetadata {
16            description: Some("ARM64 UEFI".into()),
17            tier: Some(2),
18            host_tools: Some(false),
19            std: None, // ?
20        },
21        pointer_width: 64,
22        data_layout:
23            "e-m:w-p270:32:32-p271:32:32-p272:64:64-p:64:64-i32:32-i64:64-i128:128-n32:64-S128-Fn32"
24                .into(),
25        arch: "aarch64".into(),
26        options: base,
27    }
28}