diff options
author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2018-12-19 01:30:29 +0000 |
---|---|---|
committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2018-12-19 01:30:29 +0000 |
commit | 405810c2c4c53beaf0677c19c28d32a43c8b4e45 (patch) | |
tree | b5dc55e661a4b459d51e61bf7943f1e2e20bcc8b | |
parent | 894385d57885a41c14d0b921bd99e036501651b8 (diff) | |
download | bcm5719-llvm-405810c2c4c53beaf0677c19c28d32a43c8b4e45.tar.gz bcm5719-llvm-405810c2c4c53beaf0677c19c28d32a43c8b4e45.zip |
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
llvm-svn: 349596
-rw-r--r-- | llvm/cmake/modules/TableGen.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake index d1afcb42f9d..2d942435222 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake @@ -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} |