Skip to content
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

Fix doc for rustc "-g" flag #58544

Merged
merged 2 commits into from
Feb 20, 2019
Merged

Conversation

TheBiggerGuy
Copy link
Contributor

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 #52938

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @TimNN (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 17, 2019
Copy link
Contributor

@TimNN TimNN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, otherwise LGTM.

@@ -42,11 +42,11 @@ This flag prints out various information about the compiler.

## `-g`: include debug information

A synonym for `-C debug-level=2`.
A synonym for `-C debuglevel=2`, for more see [here](codegen-options/index.html#debuginfo).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the output of rustc +stable -C help, it looks like this should actually be debuginfo.

The rustc "-g" CLI flag was miss documented to be a synonym of "-C
debug-level=2" and not the correct "-C debuginfo=2".
The rustc "-g" and "-o" fags are synonyms of the "-c" codegen flags.
This adds a link to the codegen docs for each synonym.
@GuillaumeGomez
Copy link
Member

I don't get why I was cced in here since there are no changes in HTML/CSS/JS but whatever... Looks good to me, thanks!

@bors: r=TimNN

@bors
Copy link
Contributor

bors commented Feb 17, 2019

📌 Commit 88e462b has been approved by TimNN

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 17, 2019
@TheBiggerGuy
Copy link
Contributor Author

Sorry for the first version not having the correct arg. A bit of a fail trying to fix a typo with another one.

I have just ran the full set of tests and check the doc links work locally.

The only question I have is if debug-level or debuglevel where ever correct? If so maybe a sentence in the doc letting people know of the rename.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 17, 2019
…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
@TheBiggerGuy
Copy link
Contributor Author

My quick check of the code found that LLVM uses debug-level and rustc uses debuginfo:

rustc

opt::flagmulti_s("g", "", "Equivalent to -C debuginfo=2"),
opt::flagmulti_s("O", "", "Equivalent to -C opt-level=2"),

llvm

https://github.com/rust-lang/llvm-project/blame/73a75d35b9776d56160fa3200aca4a970ae49b60/llvm/docs/CommandLine.rst#L420-L421

kennytm added a commit to kennytm/rust that referenced this pull request Feb 18, 2019
…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
@Mark-Simulacrum
Copy link
Member

@bors rollup

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Feb 18, 2019
…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
kennytm added a commit to kennytm/rust that referenced this pull request Feb 20, 2019
…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
bors added a commit that referenced this pull request Feb 20, 2019
Rollup of 24 pull requests

Successful merges:

 - #56470 (Modify doctest's auto-`fn main()` to allow `Result`s)
 - #58044 (Make overflowing and wrapping negation const)
 - #58303 (Improve stability tags display)
 - #58336 (Fix search results interactions)
 - #58384 (Fix tables display)
 - #58392 (Use less explicit shifting in std::net::ip)
 - #58409 (rustdoc: respect alternate flag when formatting impl trait)
 - #58456 (Remove no longer accurate diagnostic code about NLL)
 - #58528 (Don't use an allocation for ItemId in StmtKind)
 - #58530 (Monomorphize less code in fs::{read|write})
 - #58534 (Mention capping forbid lints)
 - #58536 (Remove UB in pointer tests)
 - #58538 (Add missing fmt structs examples)
 - #58539 (Add alias methods to PathBuf for underlying OsString (#58234))
 - #58544 (Fix doc for rustc "-g" flag)
 - #58545 (Add regression test for a specialization-related ICE (#39448))
 - #58546 (librustc_codegen_llvm => 2018)
 - #58551 (Explain a panic in test case net::tcp::tests::double_bind)
 - #58553 (Use more impl header lifetime elision)
 - #58562 (Fix style nits)
 - #58565 (Fix typo in std::future::Future docs)
 - #58568 (Fix a transposition in driver.rs.)
 - #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`)
 - #58576 (Stabilize iter::successors and iter::from_fn)
bors added a commit that referenced this pull request Feb 20, 2019
Rollup of 24 pull requests

Successful merges:

 - #56470 (Modify doctest's auto-`fn main()` to allow `Result`s)
 - #58044 (Make overflowing and wrapping negation const)
 - #58303 (Improve stability tags display)
 - #58336 (Fix search results interactions)
 - #58384 (Fix tables display)
 - #58392 (Use less explicit shifting in std::net::ip)
 - #58409 (rustdoc: respect alternate flag when formatting impl trait)
 - #58456 (Remove no longer accurate diagnostic code about NLL)
 - #58528 (Don't use an allocation for ItemId in StmtKind)
 - #58530 (Monomorphize less code in fs::{read|write})
 - #58534 (Mention capping forbid lints)
 - #58536 (Remove UB in pointer tests)
 - #58538 (Add missing fmt structs examples)
 - #58539 (Add alias methods to PathBuf for underlying OsString (#58234))
 - #58544 (Fix doc for rustc "-g" flag)
 - #58545 (Add regression test for a specialization-related ICE (#39448))
 - #58546 (librustc_codegen_llvm => 2018)
 - #58551 (Explain a panic in test case net::tcp::tests::double_bind)
 - #58553 (Use more impl header lifetime elision)
 - #58562 (Fix style nits)
 - #58565 (Fix typo in std::future::Future docs)
 - #58568 (Fix a transposition in driver.rs.)
 - #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`)
 - #58576 (Stabilize iter::successors and iter::from_fn)
@bors bors merged commit 88e462b into rust-lang:master Feb 20, 2019
@TheBiggerGuy TheBiggerGuy deleted the rustc-doc-cli-args branch February 28, 2019 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants