-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
[bootstrap] rustdoc is always built with optimizations enabled, slowing down iterative development. #137562
Comments
At the very least there should be an option in |
The compiler and standard library are always built with full optimizations because otherwise working on the compiler is basically impossible as it can't build the standard library in a reasonable amount of time. But for tools this doesn't apply, so it seems reasonable to add an option for that, possibly even defaulting to something lower than 3. |
I think even for tools we really ought to have at least one measurement done that proves the overall cycle is faster without (or with less) optimization. It's not obvious to me that e.g. rustdoc + documenting a crate would be faster with changes to rustdoc if rustdoc didn't get optimized (for the same reasons as rustc, etc.). We recently had a PR around doing the same for tools and I found that e.g. tidy is faster to build + run with O3 vs no optimization, though we didn't try other optimization levels. |
This was the PR if anyone wants to see more about it. You can jump to this comment to see some numbers. |
I think it would be very much worth testing all optimization levels, as this is basically THE usecase for them (ie. where you care about compile time, but an unoptimized build would be too slow). also note that my usecase was running a single rustdoc unit test, not documenting all of i think bootstrap should have a configuration option like |
Summary
When iteratively developing rustdoc, it uses the --release profile, which sets
opt-level=3
, which slows down the build.Command used
./x test -v --stage 2 tests/rustdoc/deref/deref-methods-24686-target.rs
Expected behaviour
Unoptimized build.
Actual behaviour
Optimized build
Bootstrap configuration (config.toml)
Operating system
NixOS
HEAD
617aad8
Additional context
Build Log
The text was updated successfully, but these errors were encountered: