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

Ian Anderson via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 15 16:35:35 PST 2026


ian-twilightcoder wrote:

> > Oh wait, this is limited to the Darwin platform? In that case, can we have some negative tests to ensure that something like `aarch64-unknown-linux-firmware` or `aarch64-unknown-firmware` is not processed as a valid triple?
> 
> Firmware definitely sounds like it would be generally applicable to other platforms, could you include Apple/Darwin in the name of functions to make it clear that this is just for Apple platforms? As far as I can tell most other embedded operating systems just use `unknown/none-elf ` for ELF platforms and that works fine.

Does it have to just be for Apple platforms? It seems like it might be generally useful for anyone to add their own semantics on top. There's no reason people can't just keep using `x86_64-unknown-none-elf` for firmware, but if someone else had a firmware ecosystem they could use e.g. `x86_64-nvidia-firmware` if they wanted?

It is a little unusual in that it's not a specific os and kind of needs a specific vendor for it to have any meaning. Even apple-firmware isn't a specific os, It's more of a collection of os-like related platforms that we need some kind of common way to refer to in the compiler.

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


More information about the cfe-commits mailing list