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

Allow to set panic='abort' in build-override #12647

Closed
link2xt opened this issue Sep 8, 2023 · 3 comments
Closed

Allow to set panic='abort' in build-override #12647

link2xt opened this issue Sep 8, 2023 · 3 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@link2xt
Copy link

link2xt commented Sep 8, 2023

Problem

Currently trying to create a section [profile.dev.build-override] with panic='abort' results in error "panic may not be specified in a build-override profile".

This validation seems to have been added for the test override to make sure tests are not built without panic='unwind' according to discussions in #5384 (comment)

Proposed Solution

Remove unnecessary validation for the build override.

Notes

This issue is a spin-off of #12645

@link2xt link2xt added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Sep 8, 2023
@ehuss
Copy link
Contributor

ehuss commented Sep 8, 2023

It is not possible to build proc-macros with abort since they are loaded within the compiler. Additionally, some build scripts will fail with panic=abort since they rely on catching unwinding. Can you say more about what you are trying to do and why?

@link2xt
Copy link
Author

link2xt commented Sep 8, 2023

I am building my dependencies with panic='abort' to save space and wanted to avoid building the same dependency another time as a build dependency: #12645

@weihanglo
Copy link
Member

It's unfortunate there are some limitations described in #12647 (comment). I would probably unset panic=abort in dev profile if appropriate, and only set it in release profile.

Closing. If you have an idea to circumvent the behavior, please share.

See also #12645 (comment)

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

3 participants