diff options
| -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(); |
