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

error: options -C embed-bitcode=no and -C lto are incompatible #25

Closed
BlinkyStitt opened this issue Jun 9, 2020 · 3 comments
Closed

Comments

@BlinkyStitt
Copy link

I wanted to try this out, but after compiling for a while, it exits with:

error: options `-C embed-bitcode=no` and `-C lto` are incompatible

I'm using nightly-2020-06-08. Is that the problem?

A quick search turned up rust-lang/cargo#8066

@BlinkyStitt
Copy link
Author

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`

@BlinkyStitt
Copy link
Author

BlinkyStitt commented Jun 9, 2020

Aha. Looks like I needed RUSTFLAGS="-C embed-bitcode"

@japaric
Copy link
Owner

japaric commented Jul 7, 2020

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.

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

No branches or pull requests

2 participants