forked from OSchip/llvm-project
Fix MLIR build with MLIR_INCLUDE_TESTS=OFF
error message /usr/bin/ld: CMakeFiles/mlir-opt.dir/mlir-opt.cpp.o: in function `main': mlir-opt.cpp:(.text.startup.main+0xb9): undefined reference to `mlir::registerTestDialect(mlir::DialectRegistry&)' Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D86592
This commit is contained in:
parent
62b39b3a0c
commit
df2efd7700
|
@ -133,7 +133,9 @@ int main(int argc, char **argv) {
|
|||
#endif
|
||||
DialectRegistry registry;
|
||||
registerAllDialects(registry);
|
||||
#ifdef MLIR_INCLUDE_TESTS
|
||||
registerTestDialect(registry);
|
||||
#endif
|
||||
return failed(MlirOptMain(argc, argv, "MLIR modular optimizer driver\n",
|
||||
registry,
|
||||
/*preloadDialectsInContext=*/false));
|
||||
|
|
Loading…
Reference in New Issue