diff options
| author | Urgau <urgau@numericable.fr> | 2023-07-12 19:30:28 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-07-12 20:04:30 +0200 |
| commit | ad16606471db319ebcb42bef9a05538079c21ab9 (patch) | |
| tree | b44a27a3d9c844df98effaadc9e48a3596c20695 /compiler/rustc_codegen_ssa/src | |
| parent | 910be1b3e83d8876a144441695b7a5077967296e (diff) | |
| download | rust-ad16606471db319ebcb42bef9a05538079c21ab9.tar.gz rust-ad16606471db319ebcb42bef9a05538079c21ab9.zip | |
De-duplicate consecutive libs when printing native-static-libs
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index c7925be0d7d..27c28072d20 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1392,6 +1392,11 @@ 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 { |
