llvm-min-tblgen is capable of building llvm/include/llvm;
- -gen-attrs
- -gen-directive-*
- -gen-intrinsics-*
- -gen-riscv-target-def
- -gen-vt
llvm-min-tblgen is built and used only when llvm-tblgen is built in-tree.
This is not installed.
llvm-tblgen is built with complete set and may be installed.
check-llvm uses not llvm-min-tblgen but llvm-tblgen.
LLVM_TABLEGEN_PROJECT overrides the definition of tablegen(project).
LLVM_HEADERS is used as the overridden prefix for LLVM header generators.
If EXPORT is not specified in add_tablegen, its tablegen is treated as internal.
Let llvm-tblgen depend on intrinsics_gen
Depends on D149072
I think there's a bit of conflict here, when you're calling add_tablegen twice with project set to LLVM.
This parameter is used for setting up the ${project}_TABLEGEN variable, which allows the user to specify a path to an existing such binary when e.g. cross compiling, instead of building a new one - see e.g. https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0/llvm/cmake/modules/TableGen.cmake#L156-L169.
Currently, this can be set via LLVM_TABLEGEN, CLANG_TABLEGEN etc. I'm not sure if we should rename the project parameter there - I think it might work by passing LLVM_CG for that parameter for the new executable, making LLVM_CG_TABLEGEN.
For easier use, one can implicitly set LLVM_NATIVE_TOOL_DIR=<directory> these days, pointing at a directory containing all these *-tblgen binaries. But despite this, the individual setting variables kinda need to work too (and I'm afraid this current form, with clashing options, might cause trouble in build configs where that variable is used, e.g. when cross compiling LLVM).