Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc: emitting only metadata causes no output #40109

Closed
Ruin0x11 opened this issue Feb 26, 2017 · 3 comments
Closed

rustc: emitting only metadata causes no output #40109

Ruin0x11 opened this issue Feb 26, 2017 · 3 comments
Labels
C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Ruin0x11
Copy link

I'm trying to obtain the rustc analysis metadata for a single .rs file, but not specifying a binary object type inside emit causes no output.

test.rs:

//! # Documentation Example
//! An example for figuring out metadata emission.

/// Begins the program.
fn main() {
    println!("Hello, world!");
}

Commands:

 » ls -a
.	..	test.rs
 » rustc --emit=metadata test.rs
 » ls -a
.	..	test.rs
 » rustc --emit=metadata,link test.rs
 » ls -a
.		..		libtest.rmeta	test		test.rs
@alexcrichton
Copy link
Member

cc @nrc

@steveklabnik steveklabnik added A-compiler T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 1, 2017
@theishshah
Copy link

I can hop on this!

@nrc
Copy link
Member

nrc commented Mar 2, 2017

Thanks @theishshah - let me know if you need any help - I'm also 'nrc' on irco

@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 27, 2017
kennytm added a commit to kennytm/rust that referenced this issue Apr 13, 2018
…r=michaelwoerister

Make --emit=metadata output metadata regardless of link

Fixes rust-lang#40109. I'm not sure whether this condition was important here or not, but I can't see why it is required (removing it doesn't cause the error the comment warns about, so I'm assuming it's safe). If this is too heavy-handed, I can special-case on `OutputType::Metadata`.
bors added a commit that referenced this issue Apr 14, 2018
…erister

Make --emit=metadata output metadata regardless of link

Fixes #40109. I'm not sure whether this condition was important here or not, but I can't see why it is required (removing it doesn't cause the error the comment warns about, so I'm assuming it's safe). If this is too heavy-handed, I can special-case on `OutputType::Metadata`.

r? @nrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants