-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Building without unwinding support #15146
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
Comments
I was wrong about why And also Currently I am working around this with a horrible hack, replacing |
Do you have a step-by-step reproducible example? Anyhow, it happens to be this tracking issue rust-lang/wg-cargo-std-aware#29. |
Going to close this in favor of rust-lang/wg-cargo-std-aware#29. Let us know if this should remain open for any reason. |
@weihanglo hi, i phrased this issue around panic strategies, but later i realized what really matters is the use of the |
build-std-features=panic_immediate_abort
yet panic_unwind
is still built and linked as dependency
@yshui Can definitely reopen this as a tracking issue, though I am not sure what difference it would make. |
yes there is some overlap, but i think rust-lang/wg-cargo-std-aware#29 is a prerequisite of this issue. yes, the another option i think would be expand wg#29 to include all uses of unwind, instead of just panic strategies; and one more option would be limit this issue to be only about |
Thanks for the clarification! However, I still don't fully understand what you're looking for. Do you specifically ask for Haven't tried but by reading the doc of backtrace I think you can specify
Therefore, I wonder what needs to be figured out here. Feel like we are kinda pivoting the issue from “don't pass down |
FWIW, here is the backtrace support issue: rust-lang/wg-cargo-std-aware#16. |
What I am looking for is building Rust programs without any unwinder at all. Currently, this means two things (IIUC): 1. use wg#29 only concerns the first point, and I think no one is tracking (2)? Hopefully this makes it clear. And I think you are right that this probably belongs to rust-lang/rust instead of here. So I think what needs to happen is a |
Thanks. So we already have two issues tracking them:
Since this is kinda blocked on externals projects, and we have two issues tracking them already, I am going to close this. Thanks for help clarify the current situation! |
Problem
So I am trying to make sure the code I build never unwinds. I am doing:
Yet cargo still builds and links
panic_unwind
, which in turn linksunwind
, and as a consequence linkslibgcc_s.so
. Related to rust-lang/rust#82521, which is trying to solve the missinglibgcc_s
problem. Here we don't want to link any unwind library at all.Steps
No response
Possible Solution(s)
No response
Notes
Did a quick code search here, so this may be wrong.
cargo/src/cargo/core/compiler/standard_lib.rs
Lines 26 to 30 in f651497
But it looks like cargo blindly adds
panic_unwind
to the list of libraries, whether it's needed or not.Version
The text was updated successfully, but these errors were encountered: