[llvm] r349596 - Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 18 17:30:29 PST 2018
Author: aganea
Date: Tue Dec 18 17:30:29 2018
New Revision: 349596
URL: http://llvm.org/viewvc/llvm-project?rev=349596&view=rev
Log:
Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"
Previously, when compiling Visual Studio targets, one could see random build errors. This was caused by tablegen projects using the same build folders.
This workaround simply chains tablegen projects.
Differential Revision: https://reviews.llvm.org/D54153
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=349596&r1=349595&r2=349596&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Tue Dec 18 17:30:29 2018
@@ -158,6 +158,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