Skip to content

Commit 9a310a3

Browse files
committed
Rollup merge of rust-lang#49140 - semarie:rustdoc-test-path, r=alexcrichton
Allow test target to pass without installing explicitly pass -L target-lib to rustdoc on OpenBSD, without it, it fails on several tests with: ``` error[E0463]: can't find crate for `std` ```
2 parents c90871c + e269a74 commit 9a310a3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/test/run-make/tools.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUSTC_ORIGINAL := $(RUSTC)
99
BARE_RUSTC := $(HOST_RPATH_ENV) '$(RUSTC)'
1010
BARE_RUSTDOC := $(HOST_RPATH_ENV) '$(RUSTDOC)'
1111
RUSTC := $(BARE_RUSTC) --out-dir $(TMPDIR) -L $(TMPDIR) $(RUSTFLAGS)
12-
RUSTDOC := $(BARE_RUSTDOC)
12+
RUSTDOC := $(BARE_RUSTDOC) -L $(TARGET_RPATH_DIR)
1313
ifdef RUSTC_LINKER
1414
RUSTC := $(RUSTC) -Clinker=$(RUSTC_LINKER)
1515
RUSTDOC := $(RUSTDOC) --linker $(RUSTC_LINKER) -Z unstable-options

src/tools/compiletest/src/runtest.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,8 @@ impl<'test> TestCx<'test> {
13241324
let mut rustdoc = Command::new(rustdoc_path);
13251325

13261326
rustdoc
1327+
.arg("-L")
1328+
.arg(self.config.run_lib_path.to_str().unwrap())
13271329
.arg("-L")
13281330
.arg(aux_dir)
13291331
.arg("-o")

0 commit comments

Comments
 (0)