-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mlir: try to export mlir targets to MLIRTargets
- Loading branch information
1 parent
85371d7
commit 976da12
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
mingw-w64-clang/0009-export-out-of-tree-mlir-targets.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- a/cmake/modules/TableGen.cmake | ||
+++ b/cmake/modules/TableGen.cmake | ||
@@ -179,14 +179,18 @@ | ||
endif() | ||
|
||
if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) | ||
- set(export_to_llvmexports) | ||
+ set(export_to_project_exports) | ||
if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR | ||
NOT LLVM_DISTRIBUTION_COMPONENTS) | ||
- set(export_to_llvmexports EXPORT LLVMExports) | ||
+ if(${CMAKE_PROJECT_NAME} STREQUAL "mlir" AND ${project} STREQUAL "MLIR") | ||
+ set(export_to_project_exports EXPORT MLIRTargets) | ||
+ else() | ||
+ set(export_to_project_exports EXPORT LLVMExports) | ||
+ endif() | ||
endif() | ||
|
||
install(TARGETS ${target} | ||
- ${export_to_llvmexports} | ||
+ ${export_to_project_exports} | ||
COMPONENT ${target} | ||
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}) | ||
if(NOT LLVM_ENABLE_IDE) | ||
@@ -195,5 +199,9 @@ | ||
COMPONENT ${target}) | ||
endif() | ||
endif() | ||
- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) | ||
+ if(${CMAKE_PROJECT_NAME} STREQUAL "mlir" AND ${project} STREQUAL "MLIR") | ||
+ set_property(GLOBAL APPEND PROPERTY MLIR_EXPORTS ${target}) | ||
+ else() | ||
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target}) | ||
+ endif() | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters