[llvm] r251138 - [CMake] Fixing dependency issue with parallel make when building with LLVM_OPTIMIZED_TABLEGEN.
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 23 12:48:18 PDT 2015
Author: cbieneman
Date: Fri Oct 23 14:48:17 2015
New Revision: 251138
URL: http://llvm.org/viewvc/llvm-project?rev=251138&view=rev
Log:
[CMake] Fixing dependency issue with parallel make when building with LLVM_OPTIMIZED_TABLEGEN.
Patch by Alex Wang
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=251138&r1=251137&r2=251138&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Fri Oct 23 14:48:17 2015
@@ -77,6 +77,13 @@ if(LLVM_USE_HOST_TOOLS)
WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
COMMENT "Building libLLVMSupport for native TableGen...")
add_custom_target(NATIVE_LIB_LLVMSUPPORT DEPENDS LIB_LLVMSUPPORT)
+
+ add_custom_command(OUTPUT LIB_LLVMTABLEGEN
+ COMMAND ${CMAKE_COMMAND} --build . --target LLVMTableGen --config Release
+ DEPENDS CONFIGURE_LLVM_NATIVE
+ WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
+ COMMENT "Building libLLVMTableGen for native TableGen...")
+ add_custom_target(NATIVE_LIB_LLVMTABLEGEN DEPENDS LIB_LLVMTABLEGEN)
endif(LLVM_USE_HOST_TOOLS)
macro(add_tablegen target project)
@@ -118,7 +125,7 @@ macro(add_tablegen target project)
add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE}
COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config Release
- DEPENDS ${target} NATIVE_LIB_LLVMSUPPORT
+ DEPENDS ${target} NATIVE_LIB_LLVMSUPPORT NATIVE_LIB_LLVMTABLEGEN
WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
COMMENT "Building native TableGen...")
add_custom_target(${project}-tablegen-host DEPENDS ${${project}_TABLEGEN_EXE})
More information about the llvm-commits
mailing list