[mlir] Make sure mlir-opt is in the list of substituted tools
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 26 May 2023 11:57:09 +0000 (13:57 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 26 May 2023 12:00:34 +0000 (14:00 +0200)
otherwise it gets picked up from $PATH, which is not always working
properly.

mlir/test/lit.cfg.py

index ad0b0d5..8f18fc6 100644 (file)
@@ -154,6 +154,8 @@ if "MLIR_OPT_CHECK_IR_ROUNDTRIP" in os.environ:
             ToolSubst("mlir-opt", "mlir-opt --verify-roundtrip", unresolved="fatal"),
         ]
     )
+else:
+    tools.extend(["mlir-opt"])
 
 llvm_config.add_tool_substitutions(tools, tool_dirs)