diff options
| author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2018-12-18 21:03:06 +0000 |
|---|---|---|
| committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2018-12-18 21:03:06 +0000 |
| commit | 7b3db0e4fd99967fc66431f60c7c6bafd99b104a (patch) | |
| tree | 86c331e342c75683dade0cb4bdea6e18e0cf6e49 | |
| parent | 6a1b06bcd4826f2de62b975535297d66da150b30 (diff) | |
| download | bcm5719-llvm-7b3db0e4fd99967fc66431f60c7c6bafd99b104a.tar.gz bcm5719-llvm-7b3db0e4fd99967fc66431f60c7c6bafd99b104a.zip | |
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: 349541
| -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..9ac229d84f4 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) + 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} |

