compnerd 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?

I think that we do need to limit it unless you are getting this run past the 
GNU project at [email protected]. This is a change to how config.sub, 
config, and autotools normalise and process triples. If this is limited to 
Apple, then while they may still have an opinion, I think it is okay to treat 
this as a vendor extension and add it to LLVM.

I don't have a conceptual issue with the idea of introducing a firmware 
environment, but this should be either very specifically an Apple only thing or 
should be run past the GNU tools maintainers as well.

> 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.

Interesting. I think that this should be codified into the triple parsing and 
we should have tests to reject the invalid triples. Basically, it sounds like: 
`aarch64-unknown-none-firmware-coff` would not be a valid triple? (ARM64, no 
vendor extensions, no OS, PE/COFF object file for a firmware environment.

https://github.com/llvm/llvm-project/pull/176272
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to