[llvm] r367895 - NATIVE tablegen needs to depend on target tablegen

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 10:50:08 PDT 2019


Author: cbieneman
Date: Mon Aug  5 10:50:08 2019
New Revision: 367895

URL: http://llvm.org/viewvc/llvm-project?rev=367895&view=rev
Log:
NATIVE tablegen needs to depend on target tablegen

This dependency was removed in  r357486, which has lead to a stream of difficult to diagnose bugs.

Without this dependency, when building with `LLVM_OPTIMIZED_TABLEGEN=On` the native tablegen executible may not be rebuilt at all, and often won't get rebuilt before targets that use the tablegen headers. In the best case this results in a build-time failure, in the worst case it results in runtime failures.

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=367895&r1=367894&r2=367895&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Mon Aug  5 10:50:08 2019
@@ -125,7 +125,7 @@ macro(add_tablegen target project)
 
   if(LLVM_USE_HOST_TOOLS)
     if( ${${project}_TABLEGEN} STREQUAL "${target}" )
-      build_native_tool(${target} ${project}_TABLEGEN_EXE)
+      build_native_tool(${target} ${project}_TABLEGEN_EXE DEPENDS ${target})
       set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE)
 
       add_custom_target(${project}-tablegen-host DEPENDS ${${project}_TABLEGEN_EXE})




More information about the llvm-commits mailing list