Understanding target triples

We will start by presenting three important definitions as follows:

  • Build is the platform where the cross-compiler is built
  • Host designates the platform where the cross-compiler will run
  • Target refers to the platform where executables or libraries generated by the cross-compiler run

In a standard cross-compiler, the build and host platforms are the same. You define the build, host, and target via target triples. These triples uniquely identify a target variation with information about the processor architecture, operating system flavor and version, C library kind, and object file type.

There is no strict format for triples. GNU tools, for instance, may accept triples composed of two, three, or even four fields in the

Get Getting Started with LLVM Core Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.