[PATCH] D54153: Fix compilation issue in VS2017 with Clang-tablegen and LLVM-tablegen

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 11:27:33 PST 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Go for it.

In D54153#1291830 <https://reviews.llvm.org/D54153#1291830>, @beanz wrote:

> I’m very confused how this could happen with Ninja. All the CMake invocations are done in targets with ‘USES_TERMINAL’ set on them which puts them in the ‘console’ pool which only allows one task at a time. So there shouldn’t be a way to have more than one Ninja invocation running at a time.


Then, I guess this is still an issue for makefile, xcode, and every other generator without a console pool mechanism.



================
Comment at: cmake/modules/TableGen.cmake:168
       add_custom_target(${project}-tablegen-host DEPENDS ${${project}_TABLEGEN_EXE})
+      if (NOT ${project} STREQUAL LLVM))
+        add_dependencies(${project}-tablegen-host LLVM-tablegen-host)
----------------
Please add a comment here about why this dependency exists. There's no real dependency, it just exists to serialize the two build steps that share the same resource (the build directory).

Actually, I suppose the proper fix for arbitrary projects using tablegen is to chain them all together, otherwise you can imagine lld tablegen and clang tablegen racing to use the same host build dir. Ew. Perhaps... make that a FIXME for now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54153/new/

https://reviews.llvm.org/D54153





More information about the llvm-commits mailing list