[mlir] Add InitializeNativeTargetAsmParser to ExecutionEngine.

This is required to allow python to work with lowerings that use inline_asm.

Differential Revision: https://reviews.llvm.org/D114338
This commit is contained in:
Nicolas Vasilache 2021-11-22 10:57:33 +00:00
parent e3d386ea27
commit 050cc1cd6e
3 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ mlirExecutionEngineCreate(MlirModule op, int optLevel, int numPaths,
const MlirStringRef *sharedLibPaths) {
static bool initOnce = [] {
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmParser(); // needed for inline_asm
llvm::InitializeNativeTargetAsmPrinter();
return true;
}();

View File

@ -26,6 +26,7 @@ add_mlir_library(MLIRExecutionEngine
intrinsics_gen
LINK_COMPONENTS
${LLVM_NATIVE_ARCH}AsmParser
Core
Coroutines
ExecutionEngine

View File

@ -4991,6 +4991,7 @@ cc_library(
":IR",
":Parser",
":Support",
"//llvm:AllTargetsAsmParsers",
"//llvm:Support",
],
)