mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Use command line metadata path if provided
If the command-line has `--emit metadata=some/path/libfoo.rmeta` then use that. Closes #85356
This commit is contained in:
parent
6f9df55a78
commit
2835351feb
@ -127,6 +127,11 @@ pub fn filename_for_metadata(
|
|||||||
crate_name: &str,
|
crate_name: &str,
|
||||||
outputs: &OutputFilenames,
|
outputs: &OutputFilenames,
|
||||||
) -> PathBuf {
|
) -> PathBuf {
|
||||||
|
// If the command-line specified the path, use that directly.
|
||||||
|
if let Some(Some(out_filename)) = sess.opts.output_types.get(&OutputType::Metadata) {
|
||||||
|
return out_filename.clone();
|
||||||
|
}
|
||||||
|
|
||||||
let libname = format!("{}{}", crate_name, sess.opts.cg.extra_filename);
|
let libname = format!("{}{}", crate_name, sess.opts.cg.extra_filename);
|
||||||
|
|
||||||
let out_filename = outputs
|
let out_filename = outputs
|
||||||
|
Loading…
Reference in New Issue
Block a user