Skip to content

Commit 17a9ee4

Browse files
amysparklu-zero
authored andcommitted
Fix static_libraries swallowing sequence of -framework flags
1 parent c09bf19 commit 17a9ee4

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/build.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use anyhow::Context as _;
1717
use cargo_util::paths::{copy, create_dir_all, open, read, read_bytes, write};
1818
use implib::def::ModuleDef;
1919
use implib::{Flavor, ImportLibrary, MachineType};
20-
use itertools::Itertools;
2120
use semver::Version;
2221

2322
use crate::build_targets::BuildTargets;
@@ -1081,7 +1080,6 @@ fn static_libraries(link_line: &str, rustc_target: &target::Target) -> String {
10811080
}
10821081
!s.is_empty()
10831082
})
1084-
.unique()
10851083
.map(|lib| {
10861084
if rustc_target.env == "msvc" && lib.ends_with(".lib") {
10871085
return format!("-l{}", lib.trim_end_matches(".lib"));
@@ -1419,11 +1417,11 @@ mod tests {
14191417
);
14201418
assert_eq!(
14211419
static_libraries(libs_msvc, &target_msvc),
1422-
"-lkernel32 -ladvapi32 -lntdll -luserenv -lws2_32 -lmsvcrt"
1420+
"-lkernel32 -ladvapi32 -lkernel32 -lntdll -luserenv -lws2_32 -lkernel32 -lws2_32 -lkernel32 -lmsvcrt"
14231421
);
14241422
assert_eq!(
14251423
static_libraries(libs_mingw, &target_mingw),
1426-
"-lkernel32 -ladvapi32 -lntdll -luserenv -lws2_32"
1424+
"-lkernel32 -ladvapi32 -lkernel32 -lntdll -luserenv -lws2_32 -lkernel32 -lws2_32 -lkernel32"
14271425
);
14281426
}
14291427
}

0 commit comments

Comments
 (0)