Knowing the backend libraries
The llc non-shared code is quite small (see tools/llc/llc.cpp) and most of its functionality is implemented as reusable libraries, in the same way as other LLVM tools. In the case of llc, its functionality is provided by the code generator libraries. This set of libraries is composed of a target-dependent part and a target-independent one. The code generator target-dependent libraries are in different files from the target-independent ones, allowing you to link with a restricted set of desired target backends. For instance, by using --enable-targets=x86,arm during the LLVM configuration, only the x86 and the ARM backend libraries are linked into llc.
Recall that all LLVM libraries are prefixed with libLLVM. We omit ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access