Add a description field to target definitions

This is the short description (`64-bit MinGW (Windows 7+)`) including
the platform requirements.

The reason for doing it like this is that this PR will be quite prone to
conflicts whenever targets get added, so it should be as simple as
possible to get it merged. Future PRs which migrate targets are scoped
to groups of targets, so they will not conflict as they can just touch
these.

This moves some of the information from the rustc book into the
compiler.
It cannot be queried yet, that is future work. It is also future work to
fill out all the descriptions, which will coincide with the work of
moving over existing target docs to the new format.
This commit is contained in:
Nilstrieb 2024-03-02 17:12:43 +01:00 committed by Maybe Waffle
parent bdde2a80ae
commit 1db67fb854
229 changed files with 234 additions and 0 deletions

View file

@ -8,6 +8,7 @@ use object::elf;
pub fn target(target_cpu: &'static str, mmcu: &'static str) -> Target {
Target {
arch: "avr".into(),
description: None,
data_layout: "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8".into(),
llvm_target: "avr-unknown-unknown".into(),
pointer_width: 16,

View file

@ -1741,6 +1741,11 @@ impl TargetWarnings {
pub struct Target {
/// Target triple to pass to LLVM.
pub llvm_target: StaticCow<str>,
/// A short description of the target including platform requirements,
/// for example "64-bit Linux (kernel 3.2+, glibc 2.17+)".
/// Optional for now, intended to be required in the future.
/// Part of #120745.
pub description: Option<StaticCow<str>>,
/// Number of bits in a pointer. Influences the `target_pointer_width` `cfg` variable.
pub pointer_width: u32,
/// Architecture to use for ABI considerations. Valid options include: "x86",
@ -2542,6 +2547,7 @@ impl Target {
let mut base = Target {
llvm_target: get_req_field("llvm-target")?.into(),
description: get_req_field("description").ok().map(Into::into),
pointer_width: get_req_field("target-pointer-width")?
.parse::<u32>()
.map_err(|_| "target-pointer-width must be an integer".to_string())?,

View file

@ -15,6 +15,7 @@ pub fn target() -> Target {
// MACOSX_DEPLOYMENT_TARGET. To enable cross-language LTO to work
// correctly, we do too.
llvm_target: macos_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -12,6 +12,7 @@ pub fn target() -> Target {
// This is required for the target to pick the right
// MACH-O commands, so we do too.
llvm_target: ios_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -8,6 +8,7 @@ pub fn target() -> Target {
Target {
llvm_target: mac_catalyst_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -12,6 +12,7 @@ pub fn target() -> Target {
// This is required for the simulator target to pick the right
// MACH-O commands, so we do too.
llvm_target: ios_sim_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -5,6 +5,7 @@ pub fn target() -> Target {
let arch = Arch::Arm64;
Target {
llvm_target: tvos_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -5,6 +5,7 @@ pub fn target() -> Target {
let arch = Arch::Arm64_sim;
Target {
llvm_target: tvos_sim_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -5,6 +5,7 @@ pub fn target() -> Target {
let base = opts("watchos", Arch::Arm64);
Target {
llvm_target: "aarch64-apple-watchos".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -9,6 +9,7 @@ pub fn target() -> Target {
// This is required for the simulator target to pick the right
// MACH-O commands, so we do too.
llvm_target: watchos_sim_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -4,6 +4,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64_be-unknown-linux-gnu".into(),
description: None,
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -7,6 +7,7 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64_be-unknown-linux-gnu_ilp32".into(),
description: None,
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -4,6 +4,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64_be-unknown-netbsd".into(),
description: None,
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -4,6 +4,7 @@ pub fn target() -> Target {
let base = base::solid::opts("asp3");
Target {
llvm_target: "aarch64-unknown-none".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -6,6 +6,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-linux-android".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -8,6 +8,7 @@ const LINKER_SCRIPT: &str = include_str!("./aarch64_nintendo_switch_freestanding
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-none".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -8,6 +8,7 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-pc-windows-gnu".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -7,6 +7,7 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-pc-windows-msvc".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-freebsd".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-fuchsia".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-hermit".into(),
description: None,
pointer_width: 64,
arch: "aarch64".into(),
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),

View file

@ -11,6 +11,7 @@ pub fn target() -> Target {
// LLVM does not currently have a separate illumos target,
// so we still pass Solaris to it
llvm_target: "aarch64-unknown-solaris2.11".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-linux-gnu".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-linux-gnu_ilp32".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -14,6 +14,7 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-linux-musl".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -8,6 +8,7 @@ pub fn target() -> Target {
Target {
// LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
llvm_target: "aarch64-unknown-linux-musl".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-netbsd".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -31,6 +31,7 @@ pub fn target() -> Target {
};
Target {
llvm_target: "aarch64-unknown-none".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -25,6 +25,7 @@ pub fn target() -> Target {
};
Target {
llvm_target: "aarch64-unknown-none".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-unknown".into(),
description: None,
pointer_width: 64,
// from: https://llvm.org/docs/LangRef.html#data-layout
// e = little endian

View file

@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-openbsd".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -8,6 +8,7 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-redox".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -8,6 +8,7 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-none".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -12,6 +12,7 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-windows".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -7,6 +7,7 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-pc-windows-msvc".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-linux-gnu".into(),
description: None,
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -5,6 +5,7 @@ pub fn target() -> Target {
let base = opts("watchos", Arch::Arm64_32);
Target {
llvm_target: "arm64_32-apple-watchos".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:o-p:32:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),

View file

@ -15,6 +15,7 @@ pub fn target() -> Target {
// MACOSX_DEPLOYMENT_TARGET. To enable cross-language LTO to work
// correctly, we do too.
llvm_target: macos_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -12,6 +12,7 @@ pub fn target() -> Target {
// This is required for the target to pick the right
// MACH-O commands, so we do too.
llvm_target: ios_llvm_target(arch).into(),
description: None,
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
arch: arch.target_arch(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, SanitizerSet, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "arm-linux-androideabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "arm-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "arm-unknown-linux-gnueabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -6,6 +6,7 @@ pub fn target() -> Target {
// to determine the calling convention and float ABI, and it doesn't
// support the "musleabi" value.
llvm_target: "arm-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -6,6 +6,7 @@ pub fn target() -> Target {
// uses it to determine the calling convention and float ABI, and it
// doesn't support the "musleabihf" value.
llvm_target: "arm-unknown-linux-gnueabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -4,6 +4,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armeb-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -6,6 +6,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
pub fn target() -> Target {
Target {
llvm_target: "armebv7r-none-eabi".into(),
description: None,
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -6,6 +6,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
pub fn target() -> Target {
Target {
llvm_target: "armebv7r-none-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -14,6 +14,7 @@ use crate::spec::{cvs, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target,
pub fn target() -> Target {
Target {
llvm_target: "armv4t-none-eabi".into(),
description: None,
pointer_width: 32,
arch: "arm".into(),
/* Data layout args are '-' separated:

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv4t-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -5,6 +5,7 @@ use crate::spec::{base, cvs, FramePointer, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv5te-none-eabi".into(),
description: None,
pointer_width: 32,
arch: "arm".into(),
/* Data layout args are '-' separated:

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv5te-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -7,6 +7,7 @@ pub fn target() -> Target {
// uses it to determine the calling convention and float ABI, and LLVM
// doesn't support the "musleabihf" value.
llvm_target: "armv5te-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv5te-unknown-linux-uclibcgnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv6-unknown-freebsd-gnueabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv6-unknown-netbsdelf-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -12,6 +12,7 @@ pub fn target() -> Target {
Target {
llvm_target: "armv6k-none-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -13,6 +13,7 @@ pub fn target() -> Target {
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-march=armv7-a"]);
Target {
llvm_target: "armv7-none-linux-android".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -13,6 +13,7 @@ pub fn target() -> Target {
Target {
llvm_target: "thumbv7a-vita-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv7-unknown-freebsd-gnueabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -6,6 +6,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv7-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -6,6 +6,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv7-unknown-linux-gnueabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -11,6 +11,7 @@ pub fn target() -> Target {
// to determine the calling convention and float ABI, and it doesn't
// support the "musleabi" value.
llvm_target: "armv7-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -8,6 +8,7 @@ pub fn target() -> Target {
// uses it to determine the calling convention and float ABI, and LLVM
// doesn't support the "musleabihf" value.
llvm_target: "armv7-unknown-linux-gnueabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -9,6 +9,7 @@ pub fn target() -> Target {
Target {
// LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
llvm_target: "armv7-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -7,6 +7,7 @@ pub fn target() -> Target {
let base = base::linux_uclibc::opts();
Target {
llvm_target: "armv7-unknown-linux-gnueabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -7,6 +7,7 @@ pub fn target() -> Target {
let base = base::linux_uclibc::opts();
Target {
llvm_target: "armv7-unknown-linux-gnueabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv7-unknown-netbsdelf-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv7-unknown-linux-gnueabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -4,6 +4,7 @@ pub fn target() -> Target {
let base = base::solid::opts("asp3");
Target {
llvm_target: "armv7a-none-eabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -4,6 +4,7 @@ pub fn target() -> Target {
let base = base::solid::opts("asp3");
Target {
llvm_target: "armv7a-none-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -32,6 +32,7 @@ pub fn target() -> Target {
};
Target {
llvm_target: "armv7a-none-eabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -24,6 +24,7 @@ pub fn target() -> Target {
};
Target {
llvm_target: "armv7a-none-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -5,6 +5,7 @@ pub fn target() -> Target {
let arch = Arch::Armv7k;
Target {
llvm_target: "armv7k-apple-watchos".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:o-p:32:32-Fi8-i64:64-a:0:32-n32-S128".into(),
arch: arch.target_arch(),

View file

@ -5,6 +5,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
pub fn target() -> Target {
Target {
llvm_target: "armv7r-none-eabi".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -5,6 +5,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
pub fn target() -> Target {
Target {
llvm_target: "armv7r-none-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -5,6 +5,7 @@ pub fn target() -> Target {
let arch = Arch::Armv7s;
Target {
llvm_target: ios_llvm_target(arch).into(),
description: None,
pointer_width: 32,
data_layout: "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".into(),
arch: arch.target_arch(),

View file

@ -5,6 +5,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ
pub fn target() -> Target {
Target {
llvm_target: "armv8r-none-eabihf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

View file

@ -4,6 +4,7 @@ use crate::{abi::Endian, spec::base};
pub fn target() -> Target {
Target {
llvm_target: "bpfeb".into(),
description: None,
data_layout: "E-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
pointer_width: 64,
arch: "bpf".into(),

View file

@ -4,6 +4,7 @@ use crate::{abi::Endian, spec::base};
pub fn target() -> Target {
Target {
llvm_target: "bpfel".into(),
description: None,
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
pointer_width: 64,
arch: "bpf".into(),

View file

@ -6,6 +6,7 @@ pub fn target() -> Target {
Target {
//https://github.com/llvm/llvm-project/blob/8b76aea8d8b1b71f6220bc2845abc749f18a19b7/clang/lib/Basic/Targets/CSKY.h
llvm_target: "csky-unknown-linux-gnuabiv2".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-a:0:32-Fi32-n32".into(),
arch: "csky".into(),

View file

@ -6,6 +6,7 @@ pub fn target() -> Target {
Target {
//https://github.com/llvm/llvm-project/blob/8b76aea8d8b1b71f6220bc2845abc749f18a19b7/clang/lib/Basic/Targets/CSKY.h
llvm_target: "csky-unknown-linux-gnuabiv2".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-a:0:32-Fi32-n32".into(),
arch: "csky".into(),

View file

@ -15,6 +15,7 @@ pub fn target() -> Target {
Target {
llvm_target: "hexagon-unknown-linux-musl".into(),
description: None,
pointer_width: 32,
data_layout: concat!(
"e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32",

View file

@ -3,6 +3,7 @@ use crate::spec::{PanicStrategy, Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "hexagon-unknown-none-elf".into(),
description: None,
pointer_width: 32,
data_layout: concat!(
"e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32",

View file

@ -11,6 +11,7 @@ pub fn target() -> Target {
// This is required for the target to pick the right
// MACH-O commands, so we do too.
llvm_target: ios_sim_llvm_target(arch).into(),
description: None,
pointer_width: 32,
data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:128-n8:16:32-S128"

View file

@ -3,6 +3,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOpt
pub fn target() -> Target {
Target {
llvm_target: "i586-pc-unknown".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -8,6 +8,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i586-unknown-netbsdelf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -16,6 +16,7 @@ pub fn target() -> Target {
//
// While ld64 doesn't understand i686, LLVM does.
llvm_target: macos_llvm_target(Arch::I686).into(),
description: None,
pointer_width: 32,
data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:128-n8:16:32-S128"

View file

@ -15,6 +15,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-linux-android".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -17,6 +17,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-pc-windows-gnu".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"

View file

@ -16,6 +16,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-pc-windows-gnu".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"

View file

@ -23,6 +23,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-pc-windows-msvc".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32"

View file

@ -9,6 +9,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-unknown-freebsd".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -9,6 +9,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-unknown-haiku".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -9,6 +9,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-unknown-hurd-gnu".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -10,6 +10,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-unknown-linux-gnu".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -23,6 +23,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-unknown-linux-musl".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -9,6 +9,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-unknown-netbsdelf".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -9,6 +9,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-unknown-openbsd".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i128:128-f64:32:64-f80:32-n8:16:32-S128"

View file

@ -78,6 +78,7 @@ pub fn target() -> Target {
// remove -gnu and use the default one.
Target {
llvm_target: "i686-unknown-windows-gnu".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"

View file

@ -16,6 +16,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-pc-windows-gnu".into(),
description: None,
pointer_width: 32,
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"

Some files were not shown because too many files have changed in this diff Show more