[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
Fri Aug 5 12:43:44 PDT 2022


nikic added a comment.

Funny that. I have a patch in testing that changes the same line to add an `OR ${project} STREQUAL CLANG` check, because clang-tblgen also needs to be exported. I think this indicates that this hardcoded list doesn't really make sense anymore, and we should instead allow the `add_tablegen()` call to specify whether this tablegen target should be exported or not. Something along the lines of `add_tablegen(mlir-pdll MLIR_PDLL EXPORT)` or `add_tablegen(mlir-pdll MLIR_PDLL INSTALL)`.

Or, now that I look through the add_tablegen() calls we have, maybe we should just drop the project check entirely? This is still guarded by LLVM_BUILD_UTILS, so in any case people need to go out of their way to actually install tablegen binaries. (LLVM_BUILD_UTILS defaults to ON for the LLVM project, but will not get set when using a different build system entry point, e.g. a runtimes build.)


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