From b604aa7ce8c2387dcbbef6e83aab3c07a1a2ad3b Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Thu, 30 Jul 2026 16:27:53 -0400 Subject: [PATCH] targets: add gnuelfv2 environment Starting with Rust 1.98, `powerpc64-unknown-linux-gnuelfv2` will be a supported triple. This commit adds a distinct `GnuElfV2` environment so `target-lexicon` accepts the triple and prints it back unchanged. --- src/targets.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/targets.rs b/src/targets.rs index 5cc5c2d..bb9ade0 100644 --- a/src/targets.rs +++ b/src/targets.rs @@ -858,6 +858,7 @@ pub enum Environment { Eabi, Eabihf, Gnu, + GnuElfV2, Gnuabi64, Gnueabi, Gnueabihf, @@ -901,6 +902,7 @@ impl Environment { Eabi => Cow::Borrowed("eabi"), Eabihf => Cow::Borrowed("eabihf"), Gnu => Cow::Borrowed("gnu"), + GnuElfV2 => Cow::Borrowed("gnuelfv2"), Gnuabi64 => Cow::Borrowed("gnuabi64"), Gnueabi => Cow::Borrowed("gnueabi"), Gnueabihf => Cow::Borrowed("gnueabihf"), @@ -1699,6 +1701,7 @@ impl FromStr for Environment { "eabi" => Eabi, "eabihf" => Eabihf, "gnu" => Gnu, + "gnuelfv2" => GnuElfV2, "gnuabi64" => Gnuabi64, "gnueabi" => Gnueabi, "gnueabihf" => Gnueabihf, @@ -1920,6 +1923,7 @@ mod tests { "powerpc64le-unknown-linux-musl", "powerpc64-unknown-freebsd", "powerpc64-unknown-linux-gnu", + "powerpc64-unknown-linux-gnuelfv2", "powerpc64-unknown-linux-musl", "powerpc64-unknown-openbsd", "powerpc64-wrs-vxworks",