Pass link search path to doctests even if build script gave no links
Pass link search path to doctests even if build script gave no links

It is entirely possible for a crate to have a build script that is simply
the equivalent to

```rustc
fn main() {
    println!("cargo:rustc-link-search=native=/some/path");
}
```

Without actually giving anything to link (for example, because the code
contains `#[link(name="foo")]`. In this case, we aren't actually passing
`-L` through when running doctests, even though they're passed when
compiling the main crate.

Fixes #1592

ThinTim/cargo,cmr/cargo,AndiDog/cargo,vojtechkral/cargo,durka/cargo,blaenk/cargo,rust-lang/cargo,eminence/cargo,tsurai/cargo,eminence/cargo,gchp/cargo,eminence/cargo,vojtechkral/cargo,sbeckeriv/cargo,gchp/cargo,durka/cargo,AndiDog/cargo,tshepang/cargo,brson/cargo,tshepang/cargo,blaenk/cargo,rust-lang/cargo,mark-buer/cargo,gchp/cargo,durka/cargo,brson/cargo,nipunn1313/cargo,rust-lang/cargo,ThinTim/cargo,rustyhorde/cargo,sbeckeriv/cargo,tshepang/cargo,cmr/cargo,AndiDog/cargo,brson/cargo,mark-buer/cargo,rustyhorde/cargo,tshepang/cargo,achanda/cargo,rustyhorde/cargo,mark-buer/cargo,mark-buer/cargo,tsurai/cargo,blaenk/cargo,brson/cargo,ThinTim/cargo,blaenk/cargo,nipunn1313/cargo,ThinTim/cargo,rust-lang/cargo,nipunn1313/cargo,cmr/cargo,tsurai/cargo,vojtechkral/cargo,durka/cargo,tsurai/cargo,gchp/cargo,sbeckeriv/cargo,eminence/cargo,vojtechkral/cargo,gchp/cargo,cmr/cargo,cmr/cargo,achanda/cargo,rustyhorde/cargo,achanda/cargo,AndiDog/cargo,AndiDog/cargo,ThinTim/cargo,sbeckeriv/cargo,achanda/cargo,brson/cargo,blaenk/cargo,mark-buer/cargo,tsurai/cargo,nipunn1313/cargo