File tree 1 file changed +8
-0
lines changed
compiler/rustc_codegen_ssa/src/back
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1803,7 +1803,11 @@ fn add_local_native_libraries(
1803
1803
codegen_results. crate_info . used_libraries . iter ( ) . filter ( |l| relevant_lib ( sess, l) ) ;
1804
1804
1805
1805
let search_path = archive_search_paths ( sess) ;
1806
+ let mut last = ( NativeLibKind :: Unspecified , None ) ;
1806
1807
for lib in relevant_libs {
1808
+ // Skip if this library is the same as the last.
1809
+ last = if ( lib. kind , lib. name ) == last { continue } else { ( lib. kind , lib. name ) } ;
1810
+
1807
1811
let name = match lib. name {
1808
1812
Some ( l) => l,
1809
1813
None => continue ,
@@ -2127,8 +2131,12 @@ fn add_upstream_native_libraries(
2127
2131
. expect ( "failed to find crate type in dependency format list" ) ;
2128
2132
2129
2133
let crates = & codegen_results. crate_info . used_crates_static ;
2134
+ let mut last = ( NativeLibKind :: Unspecified , None ) ;
2130
2135
for & ( cnum, _) in crates {
2131
2136
for lib in codegen_results. crate_info . native_libraries [ & cnum] . iter ( ) {
2137
+ // Skip if this library is the same as the last.
2138
+ last = if ( lib. kind , lib. name ) == last { continue } else { ( lib. kind , lib. name ) } ;
2139
+
2132
2140
let name = match lib. name {
2133
2141
Some ( l) => l,
2134
2142
None => continue ,
You can’t perform that action at this time.
0 commit comments