O'Reilly logo

Getting Started with LLVM Core Libraries by Rafael Auler, Bruno Cardoso Lopes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating a Clang cross-compiler

Clang dynamically supports the generation of code for any target, as seen in the previous sections. However, there are reasons to generate a target-dedicated Clang cross-compiler:

  • If the user wishes to avoid using long command lines to invoke the driver
  • If a manufacturer wishes to ship a platform-specific Clang-based toolchain to its clients

Configuration options

The LLVM configure system has the following options that assist in cross-compiler generation:

  • --target: This option specifies the default target triple that the Clang cross-compiler generates code for. This relates to the target, host, and build concepts we defined earlier. The --host and --build options are also available, but these are guessed by the configure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required