Skip to content

--emit metadata=some/path/libfoo-abc-123.rmeta doesn't work #85356

Closed
@jsgf

Description

@jsgf

I tried this code:

foo.rs:

pub fn foo() { println!("foo") }
$ mkdir out
$ rustc --crate-name foo --crate-type rlib --emit metadata=out/libfoo-abc-123.rmeta foo.rs

I expected to see this happen:
I expected this to output out/libfoo-abc-123.rmeta, as documented ("Each emission type may also specify the output filename with the form KIND=PATH, which takes precedence over the -o flag.").

Instead, this happened:
It created libfoo.rmeta in the current directory.

Meta

rustc --version --verbose:

rustc 1.54.0-nightly (8cf990c9b 2021-05-15)
binary: rustc
commit-hash: 8cf990c9b5c59f25c806fad9f4466f9d6509bbea
commit-date: 2021-05-15
host: x86_64-unknown-linux-gnu
release: 1.54.0-nightly
LLVM version: 12.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions