Closed BlinkyStitt closed 4 years ago
I'm not sure how to enable embed-bitcode:
$ RUSTFLAGS="-Z embed-bitcode" cargo call-stack --bin daemon --verbose > cg.dot
"cargo" "rustc" "--bin" "daemon" "--release" "--" "--emit=llvm-ir,obj" "-C" "lto" "-Z" "emit-stack-sizes"
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Z embed-bitcode --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: unknown debugging option: `embed-bitcode`
Aha. Looks like I needed RUSTFLAGS="-C embed-bitcode"
Thanks for the report.
It seems that the compiler flags that Cargo uses in the release profile have changed recently. This has been fixed in master; the fix will be included in the v0.1.5 release.
I wanted to try this out, but after compiling for a while, it exits with:
I'm using
nightly-2020-06-08
. Is that the problem?A quick search turned up https://github.com/rust-lang/cargo/pull/8066