Skip to content

Commit

Permalink
Auto merge of #4800 - msizanoen1:target-libs2, r=Manishearth
Browse files Browse the repository at this point in the history
Only pass `--extern` flags for rlibs in target deps directory

It seems like there are proc macros/build scripts using serde: rust-lang/rust#66207 (comment)
This fix the build error by only passing `--extern` flags for rlibs in target deps directory (if available, otherwise host deps directory).

r? @Manishearth

changelog: none
  • Loading branch information
bors committed Nov 10, 2019
2 parents 2e47cf1 + 805fef0 commit 6f9c43d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,8 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config {
// See https://github.com/rust-lang/rust-clippy/issues/4015.
let needs_disambiguation = ["serde", "regex", "clippy_lints"];
// This assumes that deps are compiled (they are for Cargo integration tests).
let deps = fs::read_dir(host_libs().join("deps")).unwrap();
let deps: Vec<_> = if let Some(target_libs) = target_libs() {
deps.chain(fs::read_dir(target_libs.join("deps")).unwrap()).collect()
} else {
deps.collect()
};
let deps = fs::read_dir(target_libs().unwrap_or_else(host_libs).join("deps")).unwrap();
let disambiguated = deps
.into_iter()
.filter_map(|dep| {
let path = dep.ok()?.path();
let name = path.file_name()?.to_string_lossy();
Expand Down

0 comments on commit 6f9c43d

Please sign in to comment.