forked from OSchip/llvm-project
[MLIR] add cmake abstraction for translation libraries
Differential Revision: https://reviews.llvm.org/D77926
This commit is contained in:
parent
ed87d9d643
commit
4c18e1d3af
|
@ -46,3 +46,9 @@ function(add_mlir_conversion_library name)
|
|||
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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
add_mlir_library(MLIRTargetLLVMIRModuleTranslation
|
||||
add_mlir_translation_library(MLIRTargetLLVMIRModuleTranslation
|
||||
LLVMIR/DebugTranslation.cpp
|
||||
LLVMIR/ModuleTranslation.cpp
|
||||
|
||||
|
@ -18,7 +18,7 @@ target_link_libraries(MLIRTargetLLVMIRModuleTranslation
|
|||
MLIRTranslation
|
||||
)
|
||||
|
||||
add_mlir_library(MLIRTargetAVX512
|
||||
add_mlir_translation_library(MLIRTargetAVX512
|
||||
LLVMIR/LLVMAVX512Intr.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
|
@ -34,7 +34,7 @@ target_link_libraries(MLIRTargetAVX512
|
|||
MLIRTargetLLVMIRModuleTranslation
|
||||
)
|
||||
|
||||
add_mlir_library(MLIRTargetLLVMIR
|
||||
add_mlir_translation_library(MLIRTargetLLVMIR
|
||||
LLVMIR/ConvertFromLLVMIR.cpp
|
||||
LLVMIR/ConvertToLLVMIR.cpp
|
||||
|
||||
|
@ -46,7 +46,7 @@ target_link_libraries(MLIRTargetLLVMIR
|
|||
MLIRTargetLLVMIRModuleTranslation
|
||||
)
|
||||
|
||||
add_mlir_library(MLIRTargetNVVMIR
|
||||
add_mlir_translation_library(MLIRTargetNVVMIR
|
||||
LLVMIR/ConvertToNVVMIR.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
|
@ -63,7 +63,7 @@ target_link_libraries(MLIRTargetNVVMIR
|
|||
MLIRTargetLLVMIRModuleTranslation
|
||||
)
|
||||
|
||||
add_mlir_library(MLIRTargetROCDLIR
|
||||
add_mlir_translation_library(MLIRTargetROCDLIR
|
||||
LLVMIR/ConvertToROCDLIR.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue