diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-05-13 15:12:42 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-05-13 15:21:12 +0200 |
| commit | 4057a7b1e3fd1a1371b5dda1fa4323c6d3426b39 (patch) | |
| tree | 15235bbe765edc68a7db7f564c6744aeb82c67e8 | |
| parent | eea00ca354855e546a1f3626c215571a5afa9e6c (diff) | |
| download | rust-4057a7b1e3fd1a1371b5dda1fa4323c6d3426b39.tar.gz rust-4057a7b1e3fd1a1371b5dda1fa4323c6d3426b39.zip | |
Add `library_search_path` to `Rustdoc`
| -rw-r--r-- | src/tools/run-make-support/src/rustdoc.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/run-make-support/src/rustdoc.rs b/src/tools/run-make-support/src/rustdoc.rs index fa8521ed919..c4f4e9f9bd2 100644 --- a/src/tools/run-make-support/src/rustdoc.rs +++ b/src/tools/run-make-support/src/rustdoc.rs @@ -143,6 +143,14 @@ impl Rustdoc { self } + /// Add a directory to the library search path. It corresponds to the `-L` + /// rustdoc option. + pub fn library_search_path<P: AsRef<Path>>(&mut self, path: P) -> &mut Self { + self.cmd.arg("-L"); + self.cmd.arg(path.as_ref()); + self + } + #[track_caller] pub fn run_fail_assert_exit_code(&mut self, code: i32) -> Output { let caller_location = std::panic::Location::caller(); |
