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 this prefix here for clarity. The target-independent code generator libraries are the following: