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

Specify in the documentation that Nightly (or RUSTC_BOOTSTRAP) are required for Z options #433

Closed
timgabets opened this issue May 7, 2020 · 4 comments · Fixed by #510
Closed

Comments

@timgabets
Copy link

Hi there,

I've tried to use grcov to generate the coverage report for my project (I'm using stable Rust)

I've set the environment variables as it's written in README:

export CARGO_INCREMENTAL=0
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
export RUSTDOCFLAGS="-Cpanic=abort"

…but when trying to build my code I see this:

$ rustc --version
rustc 1.41.0
$ cargo build
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
error: the option `Z` is only accepted on the nightly compiler`

I've tried to remove all the Z options, and build my project again, but as I see, there is not .gcno files produced in target/debug/deps/

The question is - is it possible to make grcov work with the stable Rust, or it's nightly-only feature?

@calixteman
Copy link
Collaborator

Yep normally it's a nightly feature.
But you should be able to use stable with env: RUSTC_BOOTSTRAP=1

@e00E
Copy link

e00E commented May 12, 2020

This should be explained in the Readme as the current text doesn't mention nightly so it is confusing that the instructions don't work.

@marco-c marco-c changed the title cargo build error: the option Z is only accepted on the nightly compiler Specify in the documentation that Nightly (or RUSTC_BOOTSTRAP) are required for Z options May 18, 2020
@marco-c
Copy link
Collaborator

marco-c commented May 18, 2020

It's a bit out of scope, as it's a Rust thing, but I'm OK with adding this to the README to avoid confusion.

@BenChand
Copy link

Please mention this in the Readme!

marco-c pushed a commit that referenced this issue Nov 23, 2020
* README: note that Nightly is required to use grcov

Fixes #433.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants