Change rlink serialization from MemEncoder
to FileEncoder
.
Because we're writing to a file, so `FileEncoder` is better because we don't have to write all the data to memory first.
This commit is contained in:
parent
9ecda8de85
commit
b4ba2f0bf4
2 changed files with 8 additions and 5 deletions
|
@ -368,9 +368,8 @@ impl Linker {
|
|||
}
|
||||
|
||||
if sess.opts.unstable_opts.no_link {
|
||||
let encoded = CodegenResults::serialize_rlink(&codegen_results);
|
||||
let rlink_file = self.prepare_outputs.with_extension(config::RLINK_EXT);
|
||||
std::fs::write(&rlink_file, encoded)
|
||||
CodegenResults::serialize_rlink(&rlink_file, &codegen_results)
|
||||
.map_err(|error| sess.emit_fatal(FailedWritingFile { path: &rlink_file, error }))?;
|
||||
return Ok(());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue