From 371bd4643587da89ce1bbe7e577f49d9b8acb990 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 6 Dec 2021 14:10:25 -0800 Subject: [PATCH] Document `--print link-args` The documentation makes it clear that the *exact* format of the output is not a stable guarantee. --- src/doc/rustc/src/command-line-arguments.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/doc/rustc/src/command-line-arguments.md b/src/doc/rustc/src/command-line-arguments.md index 7f482f0f2b1a0..11925ab978588 100644 --- a/src/doc/rustc/src/command-line-arguments.md +++ b/src/doc/rustc/src/command-line-arguments.md @@ -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