[PATCH] D131282: [mlir] fix `add_tablegen()` macro to allow installing mlir-pdll
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 6 13:29:49 PDT 2022
nikic added inline comments.
================
Comment at: llvm/cmake/modules/TableGen.cmake:199
COMPONENT ${target}
RUNTIME DESTINATION "${${project}_TOOLS_INSTALL_DIR}")
if(NOT LLVM_ENABLE_IDE)
----------------
Hm, a problem is that this line is going to look for `${MLIR_PDLL_TOOLS_INSTALL_DIR}`, so that variable would have to be set (presumably to `${MLIR_TOOLS_INSTALL_DIR}`), otherwise this will end up in some kind of default location. The same problem would exist for `(LLDB|LIBC|LLVM_LIBC)_TOOLS_INSTALL_DIR`, all the other ones already define the variable.
Defining MLIR_PDLL_TOOLS_INSTALL_DIR is possible, but does seem somewhat ugly. A possibility would be to accept the install path as an argument (and skip installing if not provided):
```
add_tablegen(mlir-pdll MLIR_PDLL ... DESTINATION ${MLIR_TOOLS_INSTALL_DIR})
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131282/new/
https://reviews.llvm.org/D131282
More information about the llvm-commits
mailing list