summary refs log tree commit diff
path: root/src/doc/rustdoc
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2021-02-18 16:15:24 +0100
committerMiguel Ojeda <ojeda@kernel.org>2021-02-19 02:32:45 +0100
commit755b3fc722c36d9761bf49c246b5f7c85a62380d (patch)
tree57765f30824aab704ff8d465c53d8fa2be91bc7d /src/doc/rustdoc
parentc0b64d97beebb09325b5587abed39f4f1621026f (diff)
downloadrust-755b3fc722c36d9761bf49c246b5f7c85a62380d.tar.gz
rust-755b3fc722c36d9761bf49c246b5f7c85a62380d.zip
rustdoc: Support argument files
Factors out the `rustc_driver` logic that handles argument files
so that rustdoc supports them as well, e.g.:

    rustdoc @argfile

This is needed to be able to generate docs for projects that
already use argument files when compiling them, e.g. projects
that pass a huge number of `--cfg` arguments.

The feature was stabilized for `rustc` in #66172.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'src/doc/rustdoc')
-rw-r--r--src/doc/rustdoc/src/command-line-arguments.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md
index 80f7851debf..0302fbecb6e 100644
--- a/src/doc/rustdoc/src/command-line-arguments.md
+++ b/src/doc/rustdoc/src/command-line-arguments.md
@@ -422,3 +422,10 @@ $ rustdoc src/lib.rs --crate-version 1.3.37
 When `rustdoc` receives this flag, it will print an extra "Version (version)" into the sidebar of
 the crate root's docs. You can use this flag to differentiate between different versions of your
 library's documentation.
+
+## `@path`: load command-line flags from a path
+
+If you specify `@path` on the command-line, then it will open `path` and read
+command line options from it. These options are one per line; a blank line indicates
+an empty option. The file can use Unix or Windows style line endings, and must be
+encoded as UTF-8.