Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate platforms crate #749

Merged
merged 2 commits into from Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion platforms/Cargo.toml
Expand Up @@ -4,7 +4,7 @@ description = """
Rust platform registry with information about valid Rust platforms (target
triple, target_arch, target_os) sourced from the Rust compiler.
"""
version = "3.0.1"
version = "3.0.2"
authors = ["Tony Arcieri <bascule@gmail.com>"]
license = "Apache-2.0 OR MIT"
homepage = "https://rustsec.org"
Expand Down
100 changes: 92 additions & 8 deletions platforms/src/platform/platforms.rs
Expand Up @@ -48,9 +48,12 @@ pub(crate) const ALL: &[Platform] = &[
ARM_UNKNOWN_LINUX_MUSLEABI,
ARM_UNKNOWN_LINUX_MUSLEABIHF,
ARM64_32_APPLE_WATCHOS,
ARMEB_UNKNOWN_LINUX_GNUEABI,
ARMEBV7R_NONE_EABI,
ARMEBV7R_NONE_EABIHF,
ARMV4T_NONE_EABI,
ARMV4T_UNKNOWN_LINUX_GNUEABI,
ARMV5TE_NONE_EABI,
ARMV5TE_UNKNOWN_LINUX_GNUEABI,
ARMV5TE_UNKNOWN_LINUX_MUSLEABI,
ARMV5TE_UNKNOWN_LINUX_UCLIBCEABI,
Expand Down Expand Up @@ -109,6 +112,7 @@ pub(crate) const ALL: &[Platform] = &[
MIPS64EL_UNKNOWN_LINUX_GNUABI64,
MIPS64EL_UNKNOWN_LINUX_MUSLABI64,
MIPSEL_SONY_PSP,
MIPSEL_SONY_PSX,
MIPSEL_UNKNOWN_LINUX_GNU,
MIPSEL_UNKNOWN_LINUX_MUSL,
MIPSEL_UNKNOWN_LINUX_UCLIBC,
Expand All @@ -130,6 +134,7 @@ pub(crate) const ALL: &[Platform] = &[
POWERPC64_UNKNOWN_FREEBSD,
POWERPC64_UNKNOWN_LINUX_GNU,
POWERPC64_UNKNOWN_LINUX_MUSL,
POWERPC64_UNKNOWN_OPENBSD,
POWERPC64_WRS_VXWORKS,
POWERPC64LE_UNKNOWN_FREEBSD,
POWERPC64LE_UNKNOWN_LINUX_GNU,
Expand All @@ -146,6 +151,7 @@ pub(crate) const ALL: &[Platform] = &[
RISCV64GC_UNKNOWN_LINUX_GNU,
RISCV64GC_UNKNOWN_LINUX_MUSL,
RISCV64GC_UNKNOWN_NONE_ELF,
RISCV64GC_UNKNOWN_OPENBSD,
RISCV64IMAC_UNKNOWN_NONE_ELF,
S390X_UNKNOWN_LINUX_GNU,
S390X_UNKNOWN_LINUX_MUSL,
Expand All @@ -155,6 +161,7 @@ pub(crate) const ALL: &[Platform] = &[
SPARC64_UNKNOWN_OPENBSD,
SPARCV9_SUN_SOLARIS,
THUMBV4T_NONE_EABI,
THUMBV5TE_NONE_EABI,
THUMBV6M_NONE_EABI,
THUMBV7A_PC_WINDOWS_MSVC,
THUMBV7A_UWP_WINDOWS_MSVC,
Expand Down Expand Up @@ -357,7 +364,7 @@ pub(crate) const AARCH64_UNKNOWN_HERMIT: Platform = Platform {
tier: Tier::Three,
};

/// ARM64 Linux (kernel 4.2, glibc 2.17+) [^missing-stack-probes]
/// ARM64 Linux (kernel 4.1, glibc 2.17+) [^missing-stack-probes]
pub(crate) const AARCH64_UNKNOWN_LINUX_GNU: Platform = Platform {
target_triple: "aarch64-unknown-linux-gnu",
target_arch: Arch::AArch64,
Expand Down Expand Up @@ -563,6 +570,17 @@ pub(crate) const ARM64_32_APPLE_WATCHOS: Platform = Platform {
tier: Tier::Three,
};

/// ARM BE8 the default ARM big-endian architecture since [ARMv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en).
pub(crate) const ARMEB_UNKNOWN_LINUX_GNUEABI: Platform = Platform {
target_triple: "armeb-unknown-linux-gnueabi",
target_arch: Arch::Arm,
target_os: OS::Linux,
target_env: Env::Gnu,
target_endian: Endian::Big,
target_pointer_width: PointerWidth::U32,
tier: Tier::Three,
};

/// Bare ARMv7-R, Big Endian
pub(crate) const ARMEBV7R_NONE_EABI: Platform = Platform {
target_triple: "armebv7r-none-eabi",
Expand All @@ -585,6 +603,17 @@ pub(crate) const ARMEBV7R_NONE_EABIHF: Platform = Platform {
tier: Tier::Two,
};

/// ARMv4T A32
pub(crate) const ARMV4T_NONE_EABI: Platform = Platform {
target_triple: "armv4t-none-eabi",
target_arch: Arch::Arm,
target_os: OS::None,
target_env: Env::None,
target_endian: Endian::Little,
target_pointer_width: PointerWidth::U32,
tier: Tier::Three,
};

pub(crate) const ARMV4T_UNKNOWN_LINUX_GNUEABI: Platform = Platform {
target_triple: "armv4t-unknown-linux-gnueabi",
target_arch: Arch::Arm,
Expand All @@ -595,6 +624,17 @@ pub(crate) const ARMV4T_UNKNOWN_LINUX_GNUEABI: Platform = Platform {
tier: Tier::Three,
};

/// ARMv5TE A32
pub(crate) const ARMV5TE_NONE_EABI: Platform = Platform {
target_triple: "armv5te-none-eabi",
target_arch: Arch::Arm,
target_os: OS::None,
target_env: Env::None,
target_endian: Endian::Little,
target_pointer_width: PointerWidth::U32,
tier: Tier::Three,
};

/// ARMv5TE Linux (kernel 4.4, glibc 2.23)
pub(crate) const ARMV5TE_UNKNOWN_LINUX_GNUEABI: Platform = Platform {
target_triple: "armv5te-unknown-linux-gnueabi",
Expand Down Expand Up @@ -942,7 +982,7 @@ pub(crate) const I586_PC_WINDOWS_MSVC: Platform = Platform {
tier: Tier::Two,
};

/// 32-bit Linux w/o SSE (kernel 4.4, glibc 2.23)
/// 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17)
pub(crate) const I586_UNKNOWN_LINUX_GNU: Platform = Platform {
target_triple: "i586-unknown-linux-gnu",
target_arch: Arch::X86,
Expand Down Expand Up @@ -1030,7 +1070,7 @@ pub(crate) const I686_UNKNOWN_HAIKU: Platform = Platform {
tier: Tier::Three,
};

/// 32-bit Linux (kernel 2.6.32+, glibc 2.11+)
/// 32-bit Linux (kernel 3.2+, glibc 2.17+)
pub(crate) const I686_UNKNOWN_LINUX_GNU: Platform = Platform {
target_triple: "i686-unknown-linux-gnu",
target_arch: Arch::X86,
Expand Down Expand Up @@ -1225,6 +1265,17 @@ pub(crate) const MIPSEL_SONY_PSP: Platform = Platform {
tier: Tier::Three,
};

/// MIPS (LE) Sony PlayStation 1 (PSX)
pub(crate) const MIPSEL_SONY_PSX: Platform = Platform {
target_triple: "mipsel-sony-psx",
target_arch: Arch::Mips,
target_os: OS::None,
target_env: Env::Psx,
target_endian: Endian::Little,
target_pointer_width: PointerWidth::U32,
tier: Tier::Three,
};

/// MIPS (LE) Linux (kernel 4.4, glibc 2.23)
pub(crate) const MIPSEL_UNKNOWN_LINUX_GNU: Platform = Platform {
target_triple: "mipsel-unknown-linux-gnu",
Expand Down Expand Up @@ -1342,7 +1393,7 @@ pub(crate) const POWERPC_UNKNOWN_FREEBSD: Platform = Platform {
tier: Tier::Three,
};

/// PowerPC Linux (kernel 2.6.32, glibc 2.11)
/// PowerPC Linux (kernel 3.2, glibc 2.17)
pub(crate) const POWERPC_UNKNOWN_LINUX_GNU: Platform = Platform {
target_triple: "powerpc-unknown-linux-gnu",
target_arch: Arch::PowerPc,
Expand Down Expand Up @@ -1425,7 +1476,7 @@ pub(crate) const POWERPC64_UNKNOWN_FREEBSD: Platform = Platform {
tier: Tier::Three,
};

/// PPC64 Linux (kernel 2.6.32, glibc 2.11)
/// PPC64 Linux (kernel 3.2, glibc 2.17)
pub(crate) const POWERPC64_UNKNOWN_LINUX_GNU: Platform = Platform {
target_triple: "powerpc64-unknown-linux-gnu",
target_arch: Arch::PowerPc64,
Expand All @@ -1446,6 +1497,17 @@ pub(crate) const POWERPC64_UNKNOWN_LINUX_MUSL: Platform = Platform {
tier: Tier::Three,
};

/// OpenBSD/powerpc64
pub(crate) const POWERPC64_UNKNOWN_OPENBSD: Platform = Platform {
target_triple: "powerpc64-unknown-openbsd",
target_arch: Arch::PowerPc64,
target_os: OS::OpenBSD,
target_env: Env::None,
target_endian: Endian::Big,
target_pointer_width: PointerWidth::U64,
tier: Tier::Three,
};

pub(crate) const POWERPC64_WRS_VXWORKS: Platform = Platform {
target_triple: "powerpc64-wrs-vxworks",
target_arch: Arch::PowerPc64,
Expand Down Expand Up @@ -1620,6 +1682,17 @@ pub(crate) const RISCV64GC_UNKNOWN_NONE_ELF: Platform = Platform {
tier: Tier::Two,
};

/// OpenBSD/riscv64
pub(crate) const RISCV64GC_UNKNOWN_OPENBSD: Platform = Platform {
target_triple: "riscv64gc-unknown-openbsd",
target_arch: Arch::Riscv64,
target_os: OS::OpenBSD,
target_env: Env::None,
target_endian: Endian::Little,
target_pointer_width: PointerWidth::U64,
tier: Tier::Three,
};

/// Bare RISC-V (RV64IMAC ISA)
pub(crate) const RISCV64IMAC_UNKNOWN_NONE_ELF: Platform = Platform {
target_triple: "riscv64imac-unknown-none-elf",
Expand All @@ -1631,7 +1704,7 @@ pub(crate) const RISCV64IMAC_UNKNOWN_NONE_ELF: Platform = Platform {
tier: Tier::Two,
};

/// S390x Linux (kernel 2.6.32, glibc 2.12)
/// S390x Linux (kernel 3.2, glibc 2.17)
pub(crate) const S390X_UNKNOWN_LINUX_GNU: Platform = Platform {
target_triple: "s390x-unknown-linux-gnu",
target_arch: Arch::S390X,
Expand All @@ -1642,7 +1715,7 @@ pub(crate) const S390X_UNKNOWN_LINUX_GNU: Platform = Platform {
tier: Tier::Two,
};

/// S390x Linux (kernel 2.6.32, MUSL)
/// S390x Linux (kernel 3.2, MUSL)
pub(crate) const S390X_UNKNOWN_LINUX_MUSL: Platform = Platform {
target_triple: "s390x-unknown-linux-musl",
target_arch: Arch::S390X,
Expand Down Expand Up @@ -1719,6 +1792,17 @@ pub(crate) const THUMBV4T_NONE_EABI: Platform = Platform {
tier: Tier::Three,
};

/// ARMv5TE T32
pub(crate) const THUMBV5TE_NONE_EABI: Platform = Platform {
target_triple: "thumbv5te-none-eabi",
target_arch: Arch::Arm,
target_os: OS::None,
target_env: Env::None,
target_endian: Endian::Little,
target_pointer_width: PointerWidth::U32,
tier: Tier::Three,
};

/// Bare Cortex-M0, M0+, M1
pub(crate) const THUMBV6M_NONE_EABI: Platform = Platform {
target_triple: "thumbv6m-none-eabi",
Expand Down Expand Up @@ -2100,7 +2184,7 @@ pub(crate) const X86_64_UNKNOWN_L4RE_UCLIBC: Platform = Platform {
tier: Tier::Three,
};

/// 64-bit Linux (kernel 2.6.32+, glibc 2.11+)
/// 64-bit Linux (kernel 3.2+, glibc 2.17+)
pub(crate) const X86_64_UNKNOWN_LINUX_GNU: Platform = Platform {
target_triple: "x86_64-unknown-linux-gnu",
target_arch: Arch::X86_64,
Expand Down
5 changes: 5 additions & 0 deletions platforms/src/target/env.rs
Expand Up @@ -35,6 +35,9 @@ pub enum Env {
/// `newlib`
Newlib,

/// `psx`
Psx,

/// `relibc`
Relibc,

Expand All @@ -56,6 +59,7 @@ impl Env {
Env::Msvc => "msvc",
Env::Musl => "musl",
Env::Newlib => "newlib",
Env::Psx => "psx",
Env::Relibc => "relibc",
Env::Sgx => "sgx",
Env::UClibc => "uclibc",
Expand All @@ -76,6 +80,7 @@ impl FromStr for Env {
"msvc" => Env::Msvc,
"musl" => Env::Musl,
"newlib" => Env::Newlib,
"psx" => Env::Psx,
"relibc" => Env::Relibc,
"sgx" => Env::Sgx,
"uclibc" => Env::UClibc,
Expand Down