[llvm] [TargetParser] Normalize "aarch64-amazon-linux" to "aarch64-amazon-linux-gnu" (PR #140070)
David Truby via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 05:37:59 PDT 2025
DavidTruby wrote:
> We support the most common triples arch-unknown-linux-gnu and arch-linux-gnu, as well as some vendor specific ones (though their new architectures should migrate to configuration files).
I think it would be far better to be consistent across architectures for a given distribution. Not doing so puts extra effort on the person building LLVM rather than making it a simple recompile relative to the other architecture. This risks implying LLVM has a preference for certain architectures; if building LLVM on Amazon Linux on x86_64 works out of the box but on AArch64 requires some extra changes (e.g. a config file, or extra flags, etc) then LLVM has a preference for x86_64, at least on that distribution.
FWIW I generally agree that we should say not to add vendor-specific triples for new _distributions_, and that those should use config files, but where we already have some for other architectures but not others supported by the distribution we're not being architecture neutral. So in this case, either we should remove the normalisation on x86_64, which would be a breaking change that we'd need to warn the distribution packagers about, or we should merge this patch (or something like it).
https://github.com/llvm/llvm-project/pull/140070
More information about the llvm-commits
mailing list