File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -220,14 +220,16 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
220
220
// Finalize archive
221
221
std:: mem:: drop ( builder) ;
222
222
223
- // Run ranlib to be able to link the archive
224
- let status = std:: process:: Command :: new ( "ranlib" )
225
- . arg ( self . config . dst )
226
- . status ( )
227
- . expect ( "Couldn't run ranlib" ) ;
228
-
229
- if !status. success ( ) {
230
- self . config . sess . fatal ( & format ! ( "Ranlib exited with code {:?}" , status. code( ) ) ) ;
223
+ if self . update_symbols {
224
+ // Run ranlib to be able to link the archive
225
+ let status = std:: process:: Command :: new ( "ranlib" )
226
+ . arg ( self . config . dst )
227
+ . status ( )
228
+ . expect ( "Couldn't run ranlib" ) ;
229
+
230
+ if !status. success ( ) {
231
+ self . config . sess . fatal ( & format ! ( "Ranlib exited with code {:?}" , status. code( ) ) ) ;
232
+ }
231
233
}
232
234
}
233
235
}
You can’t perform that action at this time.
0 commit comments