Skip to content

Commit d02e66d

Browse files
committed
doc: add --test-builder/--test-builder-wrapper
1 parent 713043e commit d02e66d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/doc/rustdoc/src/command-line-arguments.md

+29
Original file line numberDiff line numberDiff line change
@@ -427,3 +427,32 @@ This flag is **deprecated** and **has no effect**.
427427
Rustdoc only supports Rust source code and Markdown input formats. If the
428428
file ends in `.md` or `.markdown`, `rustdoc` treats it as a Markdown file.
429429
Otherwise, it assumes that the input file is Rust.
430+
431+
## `--test-builder`: `rustc`-like program to build tests
432+
433+
Using this flag looks like this:
434+
435+
```bash
436+
$ rustdoc --test-builder /path/to/rustc src/lib.rs
437+
```
438+
439+
Rustdoc will use the provided program to compile tests instead of the default `rustc` program from
440+
the sysroot.
441+
442+
## `--test-builder-wrapper`: wrap calls to the test builder
443+
444+
Using this flag looks like this:
445+
446+
```bash
447+
$ rustdoc --test-builder-wrapper /path/to/rustc-wrapper src/lib.rs
448+
$ rustdoc \
449+
--test-builder-wrapper rustc-wrapper1 \
450+
--test-builder-wrapper rustc-wrapper2 \
451+
--test-builder rustc \
452+
src/lib.rs
453+
```
454+
455+
Similar to cargo `build.rustc-wrapper` option, this flag takes a `rustc` wrapper program.
456+
The first argument to the program will be the test builder program.
457+
458+
This flag can be passed multiple times to nest wrappers.

0 commit comments

Comments
 (0)