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

Build fails when -Zallow-features doesn't include backtrace #230

Closed
bjorn3 opened this issue Mar 15, 2022 · 4 comments
Closed

Build fails when -Zallow-features doesn't include backtrace #230

bjorn3 opened this issue Mar 15, 2022 · 4 comments

Comments

@bjorn3
Copy link

bjorn3 commented Mar 15, 2022

-Zallow-features makes it possible to restrict which unstable features are used. Anyhow uses the backtrace feature if it detects it to be available. This check uses CARGO_ENCODED_RUSTFLAGS which contains the rustflags required for compiling for the host. When using RUSTFLAGS="-Zallow-features=" cargo build --target x86_64-unknown-linux-gnu, CARGO_ENCODED_RUSTFLAGS doesn't contain -Zallow-features=, so anyhow thinks the backtrace feature is available, however when compiling anyhow for the target -Zallow-features= is passed to rustc and thus the compilation fails.

@vi
Copy link

vi commented Aug 11, 2022

Implemented a pull request with additional negative Cargo feature to turn off all backtracing: #256.

@dtolnay
Copy link
Owner

dtolnay commented Aug 13, 2022

I was not able to reproduce this. Would you be able to provide a complete Cargo.toml and cargo/rustc version that reproduces this issue?

@jaskij

This comment was marked as off-topic.

@bjorn3
Copy link
Author

bjorn3 commented Sep 10, 2022

I can't reproduce this anymore either.

@bjorn3 bjorn3 closed this as completed Sep 10, 2022
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

4 participants