Book Image

Getting started with LLVM core libraries

Book Image

Getting started with LLVM core libraries

Overview of this book

Table of Contents (17 chapters)
Getting Started with LLVM Core Libraries
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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 <arch>-<sys/vendor>-<other>-<other> format, such as arm-linux-eabi, mips-linux-gnu, x86_64-linux-gnu, x86_64-apple-darwin11, and sparc-elf. Clang strives to maintain compatibility with GCC and thus recognizes this format, but it...