@@ -1805,13 +1805,14 @@ fn add_local_native_libraries(
1805
1805
let search_path = archive_search_paths ( sess) ;
1806
1806
let mut last = ( NativeLibKind :: Unspecified , None ) ;
1807
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
-
1811
1808
let name = match lib. name {
1812
1809
Some ( l) => l,
1813
1810
None => continue ,
1814
1811
} ;
1812
+
1813
+ // Skip if this library is the same as the last.
1814
+ last = if ( lib. kind , lib. name ) == last { continue } else { ( lib. kind , lib. name ) } ;
1815
+
1815
1816
let verbatim = lib. verbatim . unwrap_or ( false ) ;
1816
1817
match lib. kind {
1817
1818
NativeLibKind :: Dylib { as_needed } => {
@@ -2144,16 +2145,17 @@ fn add_upstream_native_libraries(
2144
2145
let mut last = ( NativeLibKind :: Unspecified , None ) ;
2145
2146
for & ( cnum, _) in crates {
2146
2147
for lib in codegen_results. crate_info . native_libraries [ & cnum] . iter ( ) {
2147
- // Skip if this library is the same as the last.
2148
- last = if ( lib. kind , lib. name ) == last { continue } else { ( lib. kind , lib. name ) } ;
2149
-
2150
2148
let name = match lib. name {
2151
2149
Some ( l) => l,
2152
2150
None => continue ,
2153
2151
} ;
2154
2152
if !relevant_lib ( sess, & lib) {
2155
2153
continue ;
2156
2154
}
2155
+
2156
+ // Skip if this library is the same as the last.
2157
+ last = if ( lib. kind , lib. name ) == last { continue } else { ( lib. kind , lib. name ) } ;
2158
+
2157
2159
let verbatim = lib. verbatim . unwrap_or ( false ) ;
2158
2160
match lib. kind {
2159
2161
NativeLibKind :: Dylib { as_needed } => {
0 commit comments