From: Alexandre Ganea Date: Wed, 19 Dec 2018 19:42:21 +0000 (+0000) Subject: Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97a44c831115787d7651db1ba6518836e1847662;p=llvm Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen" (was reverted by mistake) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349672 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake index ee1840da6c5..3c84ae78a34 100644 --- a/cmake/modules/TableGen.cmake +++ b/cmake/modules/TableGen.cmake @@ -146,6 +146,12 @@ macro(add_tablegen target project) llvm_ExternalProject_BuildCmd(tblgen_build_cmd ${target} ${LLVM_NATIVE_BUILD} CONFIGURATION Release) + # Create an artificial dependency between tablegen projects, because they + # 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) + add_dependencies(${project}-tablegen-host LLVM-tablegen-host) + endif() add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE} COMMAND ${tblgen_build_cmd} DEPENDS CONFIGURE_LLVM_NATIVE ${target}