-
Notifications
You must be signed in to change notification settings - Fork 14k
rustc: Start "stabilizing" some flags #19900
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
Conversation
|
cc @brson, @cmr, @nick29581 |
|
Not a huge fan of -v being verbose. I think that if people want verbose, they might as well just type --verbose. |
|
Looks as discussed, 👍 |
|
@sinistersnare existing tools aren't consistent about the treatment of |
|
Ah ok :) sounds good, +1 then |
|
Looks like this fixes #17938 and rust-lang/cargo#690 |
|
cc me |
|
The summary claims that I have proposed |
c51860c to
2c23def
Compare
This commit shuffles around some CLI flags of the compiler to some more stable locations with some renamings. The changes made were: * The `-v` flag has been repurposes as the "verbose" flag. The version flag has been renamed to `-V`. * The `-h` screen has been split into two parts. Most top-level options (not all) show with `-h`, and the remaining options (generally obscure) can be shown with `--help -v` which is a "verbose help screen" * The `-V` flag (version flag now) has lost its argument as it is now requested with `rustc -vV` "verbose version". * The `--emit` option has had its `ir` and `bc` variants renamed to `llvm-ir` and `llvm-bc` to emphasize that they are LLVM's IR/bytecode. * The `--emit` option has grown a new variant, `dep-info`, which subsumes the `--dep-info` CLI argument. The `--dep-info` flag is now deprecated. * The `--parse-only`, `--no-trans`, and `--no-analysis` flags have moved behind the `-Z` family of flags. * The `--debuginfo` and `--opt-level` flags were moved behind the top-level `-C` flag. * The `--print-file-name` and `--print-crate-name` flags were moved behind one global `--print` flag which now accepts one of `crate-name`, `file-names`, or `sysroot`. This global `--print` flag is intended to serve as a mechanism for learning various metadata about the compiler itself. No warnings are currently enabled to allow tools like Cargo to have time to migrate to the new flags before spraying warnings to all users.
2c23def to
117984b
Compare
This commit shuffles around some CLI flags of the compiler to some more stable locations with some renamings. The changes made were: * The `-v` flag has been repurposes as the "verbose" flag. The version flag has been renamed to `-V`. * The `-h` screen has been split into two parts. Most top-level options (not all) show with `-h`, and the remaining options (generally obscure) can be shown with `--help -v` which is a "verbose help screen" * The `-V` flag (version flag now) has lost its argument as it is now requested with `rustc -vV` "verbose version". * The `--emit` option has had its `ir` and `bc` variants renamed to `llvm-ir` and `llvm-bc` to emphasize that they are LLVM's IR/bytecode. * The `--emit` option has grown a new variant, `dep-info`, which subsumes the `--dep-info` CLI argument. The `--dep-info` flag is now deprecated. * The `--parse-only`, `--no-trans`, `--no-analysis`, and `--pretty` flags have moved behind the `-Z` family of flags. * The `--debuginfo` and `--opt-level` flags were moved behind the top-level `-C` flag. * The `--print-file-name` and `--print-crate-name` flags were moved behind one global `--print` flag which now accepts one of `crate-name`, `file-names`, or `sysroot`. This global `--print` flag is intended to serve as a mechanism for learning various metadata about the compiler itself. * The top-level `--pretty` flag was moved to a number of `-Z` options. No warnings are currently enabled to allow tools like Cargo to have time to migrate to the new flags before spraying warnings to all users. cc #19051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @alexcrichton , why did you put in this code that, AFAICT, is the identity function on Option<T> ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm I think I forgot to remove this after some other refactoring in this area, feel free to remove though!
|
@alexcrichton do we have a good place to discuss moving options around (either out of the short groups, or into the |
|
I'm fine with chatting on IRC, I was personally thinking that all of those options would stay at the top-level, but they're certainly flexible! |
|
IRC discussion here: https://botbot.me/mozilla/rust-internals/2014-12-22/?msg=28137683&page=7 |
This pull request updates the rustc manual page to represent post-rust-lang#19900 state of rustc options better. A bit unrelatedly, --help output is changed to fix some issues too: * -g and -O descriptions were changed from deprected flags to the new codegen flags. * dep-info value was moved from crate-type to emit flag. Fixes rust-lang#20111 Fixes rust-lang#20131
This pull request updates the rustc manual page to represent current state of rustc option handling better. Moved the apparently deprecated options (rust-lang#19900) to their own section and added all the new codegen options. A bit unrelatedly, I also updated description of `-O` and `-g` flags to point to the new codegen options rather than old, deprecated ones. Fixes rust-lang#20111.
fix: Fix manual not containing diagnostics documentation
This commit shuffles around some CLI flags of the compiler to some more stable
locations with some renamings. The changes made were:
-vflag has been repurposes as the "verbose" flag. The version flag hasbeen renamed to
-V.-hscreen has been split into two parts. Most top-level options (notall) show with
-h, and the remaining options (generally obscure) can beshown with
--help -vwhich is a "verbose help screen"-Vflag (version flag now) has lost its argument as it is now requestedwith
rustc -vV"verbose version".--emitoption has had itsirandbcvariants renamed tollvm-irand
llvm-bcto emphasize that they are LLVM's IR/bytecode.--emitoption has grown a new variant,dep-info, which subsumes the--dep-infoCLI argument. The--dep-infoflag is now deprecated.--parse-only,--no-trans,--no-analysis, and--prettyflags havemoved behind the
-Zfamily of flags.--debuginfoand--opt-levelflags were moved behind the top-level-Cflag.
--print-file-nameand--print-crate-nameflags were moved behind oneglobal
--printflag which now accepts one ofcrate-name,file-names, orsysroot. This global--printflag is intended to serve as a mechanism forlearning various metadata about the compiler itself.
--prettyflag was moved to a number of-Zoptions.No warnings are currently enabled to allow tools like Cargo to have time to
migrate to the new flags before spraying warnings to all users.
cc #19051