Skip to content

Commit

Permalink
Fixing dependencies for native tablegen.
Browse files Browse the repository at this point in the history
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232730 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Chris Bieneman committed Mar 19, 2015
1 parent cd7ece1 commit a7c5163
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmake/modules/TableGen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit a7c5163

Please sign in to comment.