Skip to content

Commit

Permalink
Rollup merge of rust-lang#49140 - semarie:rustdoc-test-path, r=alexcr…
Browse files Browse the repository at this point in the history
…ichton

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`
```
  • Loading branch information
kennytm committed Mar 22, 2018
2 parents 8d3f3f0 + e269a74 commit 20eaf35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/run-make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUSTC_ORIGINAL := $(RUSTC)
BARE_RUSTC := $(HOST_RPATH_ENV) '$(RUSTC)'
BARE_RUSTDOC := $(HOST_RPATH_ENV) '$(RUSTDOC)'
RUSTC := $(BARE_RUSTC) --out-dir $(TMPDIR) -L $(TMPDIR) $(RUSTFLAGS)
RUSTDOC := $(BARE_RUSTDOC)
RUSTDOC := $(BARE_RUSTDOC) -L $(TARGET_RPATH_DIR)
ifdef RUSTC_LINKER
RUSTC := $(RUSTC) -Clinker=$(RUSTC_LINKER)
RUSTDOC := $(RUSTDOC) --linker $(RUSTC_LINKER) -Z unstable-options
Expand Down
2 changes: 2 additions & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,8 @@ impl<'test> TestCx<'test> {
let mut rustdoc = Command::new(rustdoc_path);

rustdoc
.arg("-L")
.arg(self.config.run_lib_path.to_str().unwrap())
.arg("-L")
.arg(aux_dir)
.arg("-o")
Expand Down

0 comments on commit 20eaf35

Please sign in to comment.