Auto merge of #85362 - jsgf:fix-emit-metadata, r=estebank
Use command line metadata path if provided If the command-line has `--emit metadata=some/path/libfoo.rmeta` then use that. Closes #85356 I couldn't find any existing tests for the `--emit TYPE=PATH` command line syntax, so I wasn't sure how to test this aside from ad-hoc manual testing. Is there a ui test type for "generated output file with expected name"?
This commit is contained in:
commit
758c00ea40
3 changed files with 39 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
Add a link
Reference in a new issue