[llvm] cmake: Try to derive CMAKE_SYSTEM_NAME from unnormalized triples (PR #208496)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 09:27:39 PDT 2026


petrhosek wrote:

I'm still not convinced that this is the right direction, parsing triples is notoriously difficult and we have a lot of special logic for triple handling spread around LLVM and even that doesn't handle all the cases (that's why `clang -print-target-triple` doesn't always do what you want). Looking at your CMake implementation, it also doesn't handle all of the cases I've seen in the wild. Furthermore, the triple format keeps evolving which means that we now have one more thing that will need to be maintained.

Have you explored alternative approaches that wouldn't require parsing target triples in CMake? 

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


More information about the llvm-commits mailing list