Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only pass --extern flags for rlibs in target deps directory #4800

Merged
merged 1 commit into from
Nov 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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