-
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
Allow to use parallel codegen through build
command
#1691
Comments
This is actually possible with the |
Wonderful! Thanks! |
When not specified, cargo lets rustc decide, and rustc will default to 1. How should this be reflected in the docs? # The development profile, used for `cargo build`
[profile.dev]
opt-level = 0 # Controls the --opt-level the compiler builds with
debug = true # Controls whether the compiler passes `-g`
rpath = false # Controls whether the compiler passes `-C rpath`
lto = false # Controls `-C lto` for binaries and staticlibs
debug-assertions = true # Controls whether debug assertions are enabled
codegen-units = 1 # Controls whether the compiler passes `-C codegen-units` The above is slightly incorrect because the actual default is |
Ah it's fine to just have some placeholder like |
Hm, it's extremely non-obvious to me why this makes sense in a per-project |
@huonw hm that's true, I initially thought that it was closely related to the optimization level of a crate (which seems appropriate in a profile), but it may be more of a That being said, I think that most crates won't bother with this key and will instead on the compiler choosing a nice set of defaults. |
It's very unfortunate that while parallel codegen landed, it's still impossible to use it directly from
cargo build
The text was updated successfully, but these errors were encountered: