[clang] [llvm] [Triple] Make a target triple "os" for firmware (PR #176272)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 30 09:36:02 PST 2026


================
@@ -78,9 +78,13 @@ void darwin::setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str,
   if (Arch != llvm::Triple::UnknownArch)
     T.setArchName(Str);
 
-  if (ArchKind == llvm::ARM::ArchKind::ARMV6M ||
-      ArchKind == llvm::ARM::ArchKind::ARMV7M ||
-      ArchKind == llvm::ARM::ArchKind::ARMV7EM) {
+  // Standalone/bare metal compiles often unintentionally come out as
+  // armv6m-apple-ios (-target not specified, or set from Xcode). Change these
+  // cases to armv6m-unknown-macho to better reflect intent.
----------------
compnerd wrote:

I think that they should be `armv6m-apple-none-macho` or non-canonically `armv6m-apple-macho`. Apple is the vendor, stripping the OS and leaving the object format is fine.

https://github.com/llvm/llvm-project/pull/176272


More information about the cfe-commits mailing list