diff options
| author | Travis Finkenauer <tmfinken@gmail.com> | 2024-03-15 03:19:29 -0700 |
|---|---|---|
| committer | Travis Finkenauer <tmfinken@gmail.com> | 2024-03-15 03:19:29 -0700 |
| commit | d02e66ddf0f1b0d436b3a8374479ec8efbe4b1db (patch) | |
| tree | ad0813ede4e803d6e5e1077e5aa2e564d371b8d5 | |
| parent | 713043ef226332216ed75c1bd5ec1f6068a8439c (diff) | |
| download | rust-d02e66ddf0f1b0d436b3a8374479ec8efbe4b1db.tar.gz rust-d02e66ddf0f1b0d436b3a8374479ec8efbe4b1db.zip | |
doc: add --test-builder/--test-builder-wrapper
| -rw-r--r-- | src/doc/rustdoc/src/command-line-arguments.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md index b46d80eb362..fe5cb529c26 100644 --- a/src/doc/rustdoc/src/command-line-arguments.md +++ b/src/doc/rustdoc/src/command-line-arguments.md @@ -427,3 +427,32 @@ This flag is **deprecated** and **has no effect**. Rustdoc only supports Rust source code and Markdown input formats. If the file ends in `.md` or `.markdown`, `rustdoc` treats it as a Markdown file. Otherwise, it assumes that the input file is Rust. + +## `--test-builder`: `rustc`-like program to build tests + +Using this flag looks like this: + +```bash +$ rustdoc --test-builder /path/to/rustc src/lib.rs +``` + +Rustdoc will use the provided program to compile tests instead of the default `rustc` program from +the sysroot. + +## `--test-builder-wrapper`: wrap calls to the test builder + +Using this flag looks like this: + +```bash +$ rustdoc --test-builder-wrapper /path/to/rustc-wrapper src/lib.rs +$ rustdoc \ + --test-builder-wrapper rustc-wrapper1 \ + --test-builder-wrapper rustc-wrapper2 \ + --test-builder rustc \ + src/lib.rs +``` + +Similar to cargo `build.rustc-wrapper` option, this flag takes a `rustc` wrapper program. +The first argument to the program will be the test builder program. + +This flag can be passed multiple times to nest wrappers. |
