Rollup merge of #91606 - joshtriplett:stabilize-print-link-args, r=pnkfelix

Stabilize `-Z print-link-args` as `--print link-args`

We have stable options for adding linker arguments; we should have a
stable option to help debug linker arguments.

Add documentation for the new option. In the documentation, make it clear that
the *exact* format of the output is not a stable guarantee.
This commit is contained in:
Matthias Krüger 2022-01-20 17:10:32 +01:00 committed by GitHub
commit 02379e917b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 24 additions and 17 deletions

View file

@ -170,6 +170,12 @@ The valid types of print values are:
include a diagnostic note that indicates the linker flags to use when
linking the resulting static library. The note starts with the text
`native-static-libs:` to make it easier to fetch the output.
- `link-args` — This flag does not disable the `--emit` step. When linking,
this flag causes `rustc` to print the full linker invocation in a
human-readable form. This can be useful when debugging linker options. The
exact format of this debugging output is not a stable guarantee, other than
that it will include the linker executable and the text of each command-line
argument passed to the linker.
[conditional compilation]: ../reference/conditional-compilation.html