From 4057a7b1e3fd1a1371b5dda1fa4323c6d3426b39 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 13 May 2024 15:12:42 +0200 Subject: [PATCH] Add `library_search_path` to `Rustdoc` --- src/tools/run-make-support/src/rustdoc.rs | 8 ++++++++ 1 file changed, 8 insertions(+) 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>(&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();