diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-25 18:03:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-25 18:03:02 +0200 |
| commit | 812b8b42a1aa49957f9b339d2590d8ae175804ba (patch) | |
| tree | 0ee51354c97b0b6ead5d13f7e641213dbea71dfb /compiler/rustc_codegen_ssa/src | |
| parent | dad39e884093ee22e1dae1395d92a29b6b91b657 (diff) | |
| parent | 604caa09ed54ed313a512d5c61022625227a910d (diff) | |
| download | rust-812b8b42a1aa49957f9b339d2590d8ae175804ba.tar.gz rust-812b8b42a1aa49957f9b339d2590d8ae175804ba.zip | |
Rollup merge of #126943 - Urgau:dedup-all, r=petrochenkov
De-duplicate all consecutive native libs regardless of their options Address https://github.com/rust-lang/rust/pull/126913#issuecomment-2188184011 by no longer de-duplicating based on the "options" but by only looking at the generated link args, as to avoid consecutive libs that originated from different native-lib with different options (like `raw-dylib` on Windows) but isn't relevant for `--print=native-static-libs`. r? ``@petrochenkov``
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index c352100b01b..d509e4ce56d 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1490,11 +1490,6 @@ fn print_native_static_libs( let mut lib_args: Vec<_> = all_native_libs .iter() .filter(|l| relevant_lib(sess, l)) - // Deduplication of successive repeated libraries, see rust-lang/rust#113209 - // - // note: we don't use PartialEq/Eq because NativeLib transitively depends on local - // elements like spans, which we don't care about and would make the deduplication impossible - .dedup_by(|l1, l2| l1.name == l2.name && l1.kind == l2.kind && l1.verbatim == l2.verbatim) .filter_map(|lib| { let name = lib.name; match lib.kind { @@ -1521,6 +1516,8 @@ fn print_native_static_libs( | NativeLibKind::RawDylib => None, } }) + // deduplication of consecutive repeated libraries, see rust-lang/rust#113209 + .dedup() .collect(); for path in all_rust_dylibs { // FIXME deduplicate with add_dynamic_crate |
