[python] Print error code in CompilerToolError (#15099)
diff --git a/compiler/bindings/python/iree/compiler/tools/binaries.py b/compiler/bindings/python/iree/compiler/tools/binaries.py index e2d51c7..7b8e592 100644 --- a/compiler/bindings/python/iree/compiler/tools/binaries.py +++ b/compiler/bindings/python/iree/compiler/tools/binaries.py
@@ -74,6 +74,7 @@ tool_name = os.path.basename(process.args[0]) super().__init__( f"Error invoking IREE compiler tool {tool_name}\n" + f"Error code: {process.returncode}\n" f"Diagnostics:\n{errs}\n\n" f"Invoked with:\n {tool_name} {' '.join(process.args)}\n\n" f"Need more information? Set IREE_SAVE_TEMPS=/some/dir "