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
1 changed files with 5 additions and 0 deletions
|
@ -127,6 +127,11 @@ pub fn filename_for_metadata(
|
|||
crate_name: &str,
|
||||
outputs: &OutputFilenames,
|
||||
) -> 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 out_filename = outputs
|
||||
|
|
Loading…
Add table
Reference in a new issue