Rollup merge of #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`
```
This commit is contained in:
kennytm 2018-03-22 17:51:26 +08:00
commit 20eaf351a2
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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")