Skip to content

Commit ba280b0

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 + dd4e76a commit ba280b0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/compile-test.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,7 @@ 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
7267
.into_iter()
7368
.filter_map(|dep| {

0 commit comments

Comments
 (0)