Target Triples: A Guide to Compiler Chaos
2025-04-15

This article delves into the complexities of compiler target triples, such as x86_64-unknown-linux-gnu. It explains the components of a triple (architecture, vendor, OS, ABI) and reveals the differences between GCC and LLVM's handling of them. The article details the naming conventions for various architectures (x86, ARM, etc.), vendor and OS representation, and stresses the importance of consistency to avoid confusion. Ultimately, the author advises against inventing new target triple conventions when building new toolchains to facilitate cross-toolchain collaboration.
Development
target triples