Closed
Description
I tried building this hello world example with profiling enabled documented here.
$ cargo new testgcov --bin
Created binary (application) `testgcov` package
$ cd testgcov/
$ export RUSTFLAGS="-Zprofile"
$ cargo build
Compiling testgcov v0.1.0 (/home/jonathan/Dev/testgcov)
error: can't instrument with gcov profiling when compiling incrementally
error: could not compile `testgcov`.
To learn more, run the command again with --verbose.
I expected to see this happen: The Hello world demo should get built with gcov profiling.
Instead, this happened: Building failed since incremental compiling is enabled by default and I don't know how to turn it off. I deleted the target directory that was created, ran cargo clean and repeated and got the same error again.
I believe the documentation should be updated with a working example.
Meta
rustc --version --verbose
:
rustc 1.45.0-nightly (a74d1862d 2020-05-14)
binary: rustc
commit-hash: a74d1862d4d87a56244958416fd05976c58ca1a8
commit-date: 2020-05-14
host: x86_64-unknown-linux-gnu
release: 1.45.0-nightly
LLVM version: 9.0