[llvm] [Offload] Introduce offload-tblgen and initial new API implementation (PR #108413)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 09:41:38 PDT 2024
jhuber6 wrote:
> I've checked in the autogenerated files. The main issue with them now is that they're not clang-format clean. I think trying to maintain the tablegen backends so they always generate clang-format clean files isn't realistic, so I'd like to include a dependency on clang-format so they can be formatted after being generated. It's not clear to me how to achieve this with a runtime build when the clang-format tool is part of the parent LLVM project, but I'm most likely missing something obvious. Relying on whatever clang-format version is installed on the system would mean inconsistent results (unless we mandate a specific version).
>
> If anyone has any ideas on achieving this suggestions are very welcome. Or alternatively this might be a reason to decide against checking in all the generated files.
You can just pull it out of the LLVM binary path with `find_program(clang-format clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)` or similar. Failing that probably shouldn't be a hard error.
https://github.com/llvm/llvm-project/pull/108413
More information about the llvm-commits
mailing list