[llvm] [llvm][lit] Omit vendor in triples for "native" feature (PR #136325)

Raul Tambre via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 02:52:02 PDT 2025


tambry wrote:

### Background

I was building for Debian and passing `DEB_HOST_MULTIARCH` from `dpkg-architecture` as `LLVM_HOST_TRIPLE`. LLVM however strongly prefers 4 element target triples so I switched to passing 4 element tiples for `LLVM_DEFAULT_TARGET_TRIPLE` and keeping `LLVM_HOST_TRIPLE` as 3 element. E.g. `x86_64-linux-gnu` vs `x86_64-pc-linux-gnu`. This revealed that issue that everything more or less worked, sans a bunch of tests not being run.

I however went ahead and switched to 4 element triples whereever possible to better follow LLVM upstream and reduce headaches caused by the 3 vs 4 element difference throughout the stack. So I no longer really require this change myself.

### PR

Looking at this again based on your ideas... We're using a `llvm::Triple::VendorType` to decide ABI-relevant things in quite many cases. There's also `llvm::Triple::isCompatibleWith()` which handles _some_ of the cases. I think the "native" part here is taken to mean "it can run on the host system"? Which sounds like it'd still be true even with the minor ABI changes. But I'm not too certain about that... I'll just close this out rather than making an iffy possibly-not-quite-correct change.

Thanks for the review!

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


More information about the llvm-commits mailing list