[llvm] r349672 - Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 19 11:42:21 PST 2018
Author: aganea
Date: Wed Dec 19 11:42:21 2018
New Revision: 349672
URL: http://llvm.org/viewvc/llvm-project?rev=349672&view=rev
Log:
Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"
(was reverted by mistake)
Modified:
llvm/trunk/cmake/modules/TableGen.cmake
Modified: llvm/trunk/cmake/modules/TableGen.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=349672&r1=349671&r2=349672&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Wed Dec 19 11:42:21 2018
@@ -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}
More information about the llvm-commits
mailing list