[clang] [llvm] [Triple] Make an target triple "os" for firmware (PR #176272)
Jon Roelofs via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 18 11:03:48 PST 2026
================
@@ -356,13 +356,17 @@ class LLVM_LIBRARY_VISIBILITY Darwin : public AppleMachO {
mutable bool TargetInitialized;
enum DarwinPlatformKind {
+ // Platforms with associated *_DEPLOYMENT_TARGET environment variables.
MacOS,
IPhoneOS,
TvOS,
WatchOS,
DriverKit,
XROS,
- LastDarwinPlatform = XROS
+ LastDarwinPlatform = XROS,
+
+ // Additional platforms.
+ Firmware,
----------------
jroelofs wrote:
A lot of folks assume that all Apple platforms are Darwin platforms, but in the case of firmwares (and other baremetal bits), the Darwin kernel is not involved, so it doesn't make sense to refer to a firmware as being "Darwin" per se. Very good point re: adding a comment here to that effect, because we don't want people thinking this is a mistake, and _introducing_ that bug.
https://github.com/llvm/llvm-project/pull/176272
More information about the cfe-commits
mailing list