[llvm] r232730 - Fixing dependencies for native tablegen.

Chris Bieneman beanz at apple.com
Thu Mar 19 09:49:44 PDT 2015


Author: cbieneman
Date: Thu Mar 19 11:49:44 2015
New Revision: 232730

URL: http://llvm.org/viewvc/llvm-project?rev=232730&view=rev
Log:
Fixing dependencies for native tablegen.

The dependencies for cross-built tablegen were a bit confused. This fixes that. The following dependencies are now enforced:

(1) Tablegen tasks depend on the native tablegen
(2) Native tablegen depends on the cross-compiled tablegen

Although the native tablegen doesn't actually require the cross tablegen, having this dependency forces the native tablegen to rebuild whenever the cross tablegen changes.

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=232730&r1=232729&r2=232730&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Thu Mar 19 11:49:44 2015
@@ -97,14 +97,12 @@ macro(add_tablegen target project)
       set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE)
 
       add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE}
-        COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config $<CONFIGURATION>
-        DEPENDS ${LLVM_NATIVE_BUILD}/CMakeCache.txt
+        COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config Release
+        DEPENDS CONFIGURE_LLVM_NATIVE ${target}
         WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
         COMMENT "Building native TableGen...")
       add_custom_target(${project}NativeTableGen DEPENDS ${${project}_TABLEGEN_EXE})
       add_dependencies(${project}NativeTableGen CONFIGURE_LLVM_NATIVE)
-
-      add_dependencies(${target} ${project}NativeTableGen)
     endif()
   endif()
 





More information about the llvm-commits mailing list