]> git.lizzy.rs Git - rust.git/commit
rustdoc: Support argument files
authorMiguel Ojeda <ojeda@kernel.org>
Thu, 18 Feb 2021 15:15:24 +0000 (16:15 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Fri, 19 Feb 2021 01:32:45 +0000 (02:32 +0100)
commit755b3fc722c36d9761bf49c246b5f7c85a62380d
tree57765f30824aab704ff8d465c53d8fa2be91bc7d
parentc0b64d97beebb09325b5587abed39f4f1621026f
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>
compiler/rustc_driver/src/args.rs
compiler/rustc_driver/src/lib.rs
src/doc/rustdoc/src/command-line-arguments.md
src/librustdoc/lib.rs
src/test/rustdoc-ui/commandline-argfile-badutf8.args [new file with mode: 0644]
src/test/rustdoc-ui/commandline-argfile-badutf8.rs [new file with mode: 0644]
src/test/rustdoc-ui/commandline-argfile-badutf8.stderr [new file with mode: 0644]
src/test/rustdoc-ui/commandline-argfile-missing.rs [new file with mode: 0644]
src/test/rustdoc-ui/commandline-argfile-missing.stderr [new file with mode: 0644]
src/test/rustdoc-ui/commandline-argfile.args [new file with mode: 0644]
src/test/rustdoc-ui/commandline-argfile.rs [new file with mode: 0644]