mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[CMake][MLIR][Linalg] Adding variable to specify tablegen file dependencies.
Synchronizing multiple custom targets requires not only target but also file dependencies. Building Linalg involves running yaml-gen followed by tablegen. Currently, these custom targets are only synchronized using a target dependency resulting in issues in specific incremental build setups (https://llvm.discourse.group/t/missing-build-cmake-tblgen-dependency/3727/10). This patch introduces a novel LLVM_TARGET_DEPENDS variable to the TableGen.cmake file to provide a way to specify file dependencies. Additionally, it adapts the Linalg CMakeLists.txt to introduce the necessary file dependency between yaml-gen and tablegen. Differential Revision: https://reviews.llvm.org/D105272
This commit is contained in:
parent
856c1b08d5
commit
d1d5a9b638
@ -1,4 +1,5 @@
|
||||
# LLVM_TARGET_DEFINITIONS must contain the name of the .td file to process.
|
||||
# LLVM_TARGET_DEFINITIONS must contain the name of the .td file to process,
|
||||
# while LLVM_TARGET_DEPENDS may contain additional file dependencies.
|
||||
# Extra parameters for `tblgen' may come after `ofn' parameter.
|
||||
# Adds the name of the generated file to TABLEGEN_OUTPUT.
|
||||
|
||||
@ -104,6 +105,7 @@ function(tablegen project ofn)
|
||||
DEPENDS ${${project}_TABLEGEN_TARGET} ${${project}_TABLEGEN_EXE}
|
||||
${local_tds} ${global_tds}
|
||||
${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
|
||||
${LLVM_TARGET_DEPENDS}
|
||||
COMMENT "Building ${ofn}..."
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user