diff --git a/frontend/catalyst/compiler.py b/frontend/catalyst/compiler.py index b016244cd8..e12ddccd58 100644 --- a/frontend/catalyst/compiler.py +++ b/frontend/catalyst/compiler.py @@ -487,6 +487,9 @@ def run_from_ir(self, ir: str, module_name: str, workspace: Directory): output = LinkerDriver.run(output_object_name, options=self.options) output_object_name = str(pathlib.Path(output).absolute()) + # Clean up temporary files + if os.path.exists(tmp_infile_name): + os.remove(tmp_infile_name) if os.path.exists(output_ir_name): os.remove(output_ir_name)