mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Don't pass local_crate_name to link_binary separately
It is already part of CodegenResults
This commit is contained in:
parent
5aaa953dcc
commit
56ee9864c1
@ -219,7 +219,6 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
|||||||
sess,
|
sess,
|
||||||
&codegen_results,
|
&codegen_results,
|
||||||
outputs,
|
outputs,
|
||||||
&codegen_results.crate_info.local_crate_name.as_str(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -292,12 +292,7 @@ impl CodegenBackend for LlvmCodegenBackend {
|
|||||||
|
|
||||||
// Run the linker on any artifacts that resulted from the LLVM run.
|
// Run the linker on any artifacts that resulted from the LLVM run.
|
||||||
// This should produce either a finished executable or library.
|
// This should produce either a finished executable or library.
|
||||||
link_binary::<LlvmArchiveBuilder<'_>>(
|
link_binary::<LlvmArchiveBuilder<'_>>(sess, &codegen_results, outputs);
|
||||||
sess,
|
|
||||||
&codegen_results,
|
|
||||||
outputs,
|
|
||||||
&codegen_results.crate_info.local_crate_name.as_str(),
|
|
||||||
);
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,6 @@ pub fn link_binary<'a, B: ArchiveBuilder<'a>>(
|
|||||||
sess: &'a Session,
|
sess: &'a Session,
|
||||||
codegen_results: &CodegenResults,
|
codegen_results: &CodegenResults,
|
||||||
outputs: &OutputFilenames,
|
outputs: &OutputFilenames,
|
||||||
crate_name: &str,
|
|
||||||
) {
|
) {
|
||||||
let _timer = sess.timer("link_binary");
|
let _timer = sess.timer("link_binary");
|
||||||
let output_metadata = sess.opts.output_types.contains_key(&OutputType::Metadata);
|
let output_metadata = sess.opts.output_types.contains_key(&OutputType::Metadata);
|
||||||
@ -87,7 +86,12 @@ pub fn link_binary<'a, B: ArchiveBuilder<'a>>(
|
|||||||
.tempdir()
|
.tempdir()
|
||||||
.unwrap_or_else(|err| sess.fatal(&format!("couldn't create a temp dir: {}", err)));
|
.unwrap_or_else(|err| sess.fatal(&format!("couldn't create a temp dir: {}", err)));
|
||||||
let path = MaybeTempDir::new(tmpdir, sess.opts.cg.save_temps);
|
let path = MaybeTempDir::new(tmpdir, sess.opts.cg.save_temps);
|
||||||
let out_filename = out_filename(sess, crate_type, outputs, crate_name);
|
let out_filename = out_filename(
|
||||||
|
sess,
|
||||||
|
crate_type,
|
||||||
|
outputs,
|
||||||
|
&codegen_results.crate_info.local_crate_name.as_str(),
|
||||||
|
);
|
||||||
match crate_type {
|
match crate_type {
|
||||||
CrateType::Rlib => {
|
CrateType::Rlib => {
|
||||||
let _timer = sess.timer("link_rlib");
|
let _timer = sess.timer("link_rlib");
|
||||||
|
Loading…
Reference in New Issue
Block a user