[PATCH] D77926: [MLIR] add cmake abstraction for translation libraries
Stephen Neuendorffer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 11 22:24:07 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4c18e1d3afef: [MLIR] add cmake abstraction for translation libraries (authored by stephenneuendorffer).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77926/new/
https://reviews.llvm.org/D77926
Files:
mlir/cmake/modules/AddMLIR.cmake
mlir/lib/Target/CMakeLists.txt
mlir/tools/mlir-translate/CMakeLists.txt
Index: mlir/tools/mlir-translate/CMakeLists.txt
===================================================================
--- mlir/tools/mlir-translate/CMakeLists.txt
+++ mlir/tools/mlir-translate/CMakeLists.txt
@@ -1,14 +1,11 @@
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+get_property(translation_libs GLOBAL PROPERTY MLIR_TRANSLATION_LIBS)
set(LIBS
${dialect_libs}
+ ${translation_libs}
MLIRParser
MLIRPass
MLIRSPIRV
- MLIRSPIRVSerialization
- MLIRTargetAVX512
- MLIRTargetLLVMIR
- MLIRTargetNVVMIR
- MLIRTargetROCDLIR
MLIRTranslation
MLIRSupport
)
Index: mlir/lib/Target/CMakeLists.txt
===================================================================
--- mlir/lib/Target/CMakeLists.txt
+++ mlir/lib/Target/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_mlir_library(MLIRTargetLLVMIRModuleTranslation
+add_mlir_translation_library(MLIRTargetLLVMIRModuleTranslation
LLVMIR/DebugTranslation.cpp
LLVMIR/ModuleTranslation.cpp
@@ -18,7 +18,7 @@
MLIRTranslation
)
-add_mlir_library(MLIRTargetAVX512
+add_mlir_translation_library(MLIRTargetAVX512
LLVMIR/LLVMAVX512Intr.cpp
ADDITIONAL_HEADER_DIRS
@@ -34,7 +34,7 @@
MLIRTargetLLVMIRModuleTranslation
)
-add_mlir_library(MLIRTargetLLVMIR
+add_mlir_translation_library(MLIRTargetLLVMIR
LLVMIR/ConvertFromLLVMIR.cpp
LLVMIR/ConvertToLLVMIR.cpp
@@ -46,7 +46,7 @@
MLIRTargetLLVMIRModuleTranslation
)
-add_mlir_library(MLIRTargetNVVMIR
+add_mlir_translation_library(MLIRTargetNVVMIR
LLVMIR/ConvertToNVVMIR.cpp
ADDITIONAL_HEADER_DIRS
@@ -63,7 +63,7 @@
MLIRTargetLLVMIRModuleTranslation
)
-add_mlir_library(MLIRTargetROCDLIR
+add_mlir_translation_library(MLIRTargetROCDLIR
LLVMIR/ConvertToROCDLIR.cpp
ADDITIONAL_HEADER_DIRS
Index: mlir/cmake/modules/AddMLIR.cmake
===================================================================
--- mlir/cmake/modules/AddMLIR.cmake
+++ mlir/cmake/modules/AddMLIR.cmake
@@ -46,3 +46,9 @@
set_property(GLOBAL APPEND PROPERTY MLIR_CONVERSION_LIBS ${name})
add_mlir_library(${ARGV})
endfunction(add_mlir_conversion_library)
+
+# Declare the library associated with a translation.
+function(add_mlir_translation_library name)
+ set_property(GLOBAL APPEND PROPERTY MLIR_TRANSLATION_LIBS ${name})
+ add_mlir_library(${ARGV})
+endfunction(add_mlir_translation_library)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77926.256821.patch
Type: text/x-patch
Size: 2345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200412/4ee67c9c/attachment.bin>
More information about the llvm-commits
mailing list