-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Properly document and explain opt-levels s and z #52938
Comments
This would make |
I wonder if there are any ideas on how to make the rustc book more visible. I'm curious what information would be useful to know about the opt levels. If it told you that Perhaps one thing that would be useful to add is that TLDR: What info would you like to see? |
@ehuss My wishlist:
|
One of the appropriate places to put this information would be in the manual pages ( |
It would be nice to document and list the optimization passes for ## opt-level
This flag lets you control the optimization level.
* `0`: no optimizations
* `1`: basic optimizations
* `2`: some optimizations
* `3`: all optimizations
* `s`: optimize for binary size
* `z`: optimize for binary size, but also turn off loop vectorization. In LLVM 3.8, Even if it wasn't exhaustive, src/doc/rustc/src/codegen-options/index.md ought to at least examples of what's added. |
…TimNN Fix doc for rustc "-g" flag The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym. I am unsure of this will conflict with work on rust-lang#52938
…TimNN Fix doc for rustc "-g" flag The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym. I am unsure of this will conflict with work on rust-lang#52938
…TimNN Fix doc for rustc "-g" flag The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym. I am unsure of this will conflict with work on rust-lang#52938
…TimNN Fix doc for rustc "-g" flag The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym. I am unsure of this will conflict with work on rust-lang#52938
I think the most important information: is |
Any update on this? I just tested and it hasn't changed much at all |
These opt-levels have been stabilized in #50265. If I'm not mistaken,
rustc -C help
still outputs this:So not very helpful at all. I think there should be a better explanation for
rustc -C help
(also for levels 0 -- 3). The rustc guide has some information, but it's rather hidden.I'd also suggest to change the current one-line-per-option layout of
-Z help
and-C help
. Currently it discourages people to add more useful information if they have to crank it into one line. Why not something like:Or something like that.
The text was updated successfully, but these errors were encountered: