-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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-override results in the same dependency being compiled twice #12645
Comments
That's a consequence of this setting, not By default, the panic strategy applies to build scripts and build dependencies is Compiler settings of build scripts are usually different from normal dependencies. This is kind of a tradeoff and somebody may run into the bad part. However, I don't really know why we cannot force change panic for build scripts. Let's nominate this to discuss. |
Setting Prior discussions are about tests which probably makes sense because it is common to use assertions that panic in the tests instead of returning |
Sorry not being clear. I meant the title is a bit misleading. It's about the panic setting always sticking to unwind. If that is the case, could you update to something like "support |
Fourth step to reproduce (trying to set |
I have created a separate proposal #12647 to track |
As ehuss said in #12647 (comment), it's unlikely for Cargo to know whether a build script could be built with Going to close this as not planned, but let us know if you've got new thought to resolve the limitation. |
Problem
I am compiling tag v1.121.0 of https://github.com/deltachat/deltachat-core-rust with command
cargo build
. It compilesaho-corasick v1.0.2
dependency twice, once as a dependency and once as a build dependency, resulting in two.rlib
field being produced and actually slowing down the build process rather than speeding it up as intended by the build-override feature.Steps
cargo build -v
.aho-corasick v1.0.2
dependency being compiled twice. Once as a proper dependency with-C panic=abort
as specified in the manifest, and once as a build dependency without-C panic=abort
.panic='abort'
in the[profile.dev.build-override]
section ofCargo.toml
as a workaround, it results in an error "panic
may not be specified in abuild-override
profile".Possible Solution(s)
Do not apply
build-override
to dependencies that are actual dependencies of the project? Or allow to disable build-override completely.Notes
I wrote a longer thread with my observations of the build times and duplicate builds of dependencies at https://users.rust-lang.org/t/same-dependency-has-four-different-debug-fingerprints/99580
Version
The text was updated successfully, but these errors were encountered: