diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-04 15:49:57 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-26 18:02:42 +0000 |
| commit | 98a6eaa7f8436cbedc79a21fe3ec62e8a35ef392 (patch) | |
| tree | a6835944334c03cdcf17cacf468a088c95d854c5 /compiler/rustc_driver_impl/src | |
| parent | eacbe65dfea942f40bf475658a154292077fde07 (diff) | |
| download | rust-98a6eaa7f8436cbedc79a21fe3ec62e8a35ef392.tar.gz rust-98a6eaa7f8436cbedc79a21fe3ec62e8a35ef392.zip | |
Serialize OutputFilenames into rmeta file
This ensures that linking will use the correct crate name even when `#![crate_name = "..."]` is used to specify the crate name.
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index a2a11ef5ac2..a0794daa23c 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -648,12 +648,11 @@ fn show_md_content_with_pager(content: &str, color: ColorConfig) { fn process_rlink(sess: &Session, compiler: &interface::Compiler) { assert!(sess.opts.unstable_opts.link_only); if let Input::File(file) = &sess.io.input { - let outputs = compiler.build_output_filenames(sess, &[]); let rlink_data = fs::read(file).unwrap_or_else(|err| { sess.emit_fatal(RlinkUnableToRead { err }); }); - let codegen_results = match CodegenResults::deserialize_rlink(sess, rlink_data) { - Ok(codegen) => codegen, + let (codegen_results, outputs) = match CodegenResults::deserialize_rlink(sess, rlink_data) { + Ok((codegen, outputs)) => (codegen, outputs), Err(err) => { match err { CodegenErrors::WrongFileType => sess.emit_fatal(RLinkWrongFileType), |
