[PATCH] D60024: [cmake] Add function for building native tool
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 29 19:18:44 PDT 2019
smeenai marked 2 inline comments as done.
smeenai added inline comments.
================
Comment at: llvm/cmake/modules/TableGen.cmake:138
+ build_native_tool(TARGET ${target}
+ DEPENDS ${target}
+ COMMENT "Building native TableGen..."
----------------
I have no idea why we make the native tblgen depend on the target's tblgen, but I didn't want to change that in this diff. I might try getting rid of it in a follow-up and seeing what happens.
================
Comment at: llvm/cmake/modules/TableGen.cmake:148
# compile the same dependencies, thus using the same build folders.
# FIXME: A proper fix requires sequentially chaining tablegens.
if (NOT ${project} STREQUAL LLVM AND TARGET ${project}-tablegen-host)
----------------
With the new centralized function, we could consider adding this chaining in there (which would probably require moving the `add_custom_target` call into the function as well). However, I'm not sure how to do this chaining in a generic way without introducing unnecessary dependencies; for example, it would be really unfortunate if llvm-tblgen ended up depending on llvm-opt. USES_TERMINAL is the perfect solution to this problem in Ninja, but I don't know of any way to prevent targets from building in parallel on another generator without introducing an artificial dependency.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60024/new/
https://reviews.llvm.org/D60024
More information about the llvm-commits
mailing list