diff options
| author | bors <bors@rust-lang.org> | 2019-11-10 04:51:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-10 04:51:23 +0000 |
| commit | 6f9c43ddc5e9ca7ce53f8736001411d8143ceaa7 (patch) | |
| tree | e4b52090687af7039d31898390df349a5f48792b | |
| parent | 2e47cf1b839ed1cde5569c939daefc54b91b671d (diff) | |
| parent | 805fef0301a5a60f3f3c445a5f0637365412ecb5 (diff) | |
| download | rust-6f9c43ddc5e9ca7ce53f8736001411d8143ceaa7.tar.gz rust-6f9c43ddc5e9ca7ce53f8736001411d8143ceaa7.zip | |
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: https://github.com/rust-lang/rust/pull/66207#issuecomment-552159692 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
| -rw-r--r-- | tests/compile-test.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 2dd88f3ba5e..9c34d490b53 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -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(); |
