diff options
-rw-r--r-- | llvm/cmake/modules/TableGen.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake index 23c8fd8a2ba..ca9357e295e 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake @@ -125,6 +125,9 @@ macro(add_tablegen target project) if(LLVM_USE_HOST_TOOLS) if( ${${project}_TABLEGEN} STREQUAL "${target}" ) + # The NATIVE tablegen executable *must* depend on the current target one + # otherwise the native one won't get rebuilt when the tablgen sources + # change, and we end up with incorrect builds. build_native_tool(${target} ${project}_TABLEGEN_EXE DEPENDS ${target}) set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE) |