Skip to content

Commit 6f9c43d

Browse files
committed
Auto merge of #4800 - msizanoen1:target-libs2, r=Manishearth
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
2 parents 2e47cf1 + 805fef0 commit 6f9c43d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/compile-test.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,8 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config {
6262
// See https://github.com/rust-lang/rust-clippy/issues/4015.
6363
let needs_disambiguation = ["serde", "regex", "clippy_lints"];
6464
// This assumes that deps are compiled (they are for Cargo integration tests).
65-
let deps = fs::read_dir(host_libs().join("deps")).unwrap();
66-
let deps: Vec<_> = if let Some(target_libs) = target_libs() {
67-
deps.chain(fs::read_dir(target_libs.join("deps")).unwrap()).collect()
68-
} else {
69-
deps.collect()
70-
};
65+
let deps = fs::read_dir(target_libs().unwrap_or_else(host_libs).join("deps")).unwrap();
7166
let disambiguated = deps
72-
.into_iter()
7367
.filter_map(|dep| {
7468
let path = dep.ok()?.path();
7569
let name = path.file_name()?.to_string_lossy();

0 commit comments

Comments
 (0)