Pass owned CodegenResults to link_binary

After link_binary the temporary files referenced by CodegenResults are
deleted, so calling link_binary again with the same CodegenResults
should not be allowed.
This commit is contained in:
bjorn3 2024-11-09 21:22:00 +00:00
parent cb44c0c8b6
commit 0a619dbc5d
3 changed files with 6 additions and 6 deletions

View file

@ -382,7 +382,7 @@ impl CodegenBackend for LlvmCodegenBackend {
// Run the linker on any artifacts that resulted from the LLVM run.
// This should produce either a finished executable or library.
link_binary(sess, &LlvmArchiveBuilderBuilder, &codegen_results, outputs)
link_binary(sess, &LlvmArchiveBuilderBuilder, codegen_results, outputs)
}
}