File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,7 @@ pub fn auditwheel_rs(
255
255
if !target. is_linux ( ) || platform_tag == Some ( PlatformTag :: Linux ) {
256
256
return Ok ( ( Policy :: default ( ) , false ) ) ;
257
257
}
258
+ let cross_compiling = target. cross_compiling ( ) ;
258
259
let arch = target. target_arch ( ) . to_string ( ) ;
259
260
let mut file = File :: open ( path) . map_err ( AuditWheelError :: IoError ) ?;
260
261
let mut buffer = Vec :: new ( ) ;
@@ -298,10 +299,15 @@ pub fn auditwheel_rs(
298
299
should_repair = false ;
299
300
break ;
300
301
}
301
- Err ( AuditWheelError :: LinksForbiddenLibrariesError ( ..) ) => {
302
- highest_policy = Some ( policy. clone ( ) ) ;
303
- should_repair = true ;
304
- break ;
302
+ Err ( err @ AuditWheelError :: LinksForbiddenLibrariesError ( ..) ) => {
303
+ // TODO: support repair for cross compiled wheels
304
+ if !cross_compiling {
305
+ highest_policy = Some ( policy. clone ( ) ) ;
306
+ should_repair = true ;
307
+ break ;
308
+ } else {
309
+ return Err ( err) ;
310
+ }
305
311
}
306
312
Err ( AuditWheelError :: VersionedSymbolTooNewError ( ..) )
307
313
| Err ( AuditWheelError :: BlackListedSymbolsError ( ..) )
@@ -333,9 +339,14 @@ pub fn auditwheel_rs(
333
339
should_repair = false ;
334
340
Ok ( policy)
335
341
}
336
- Err ( AuditWheelError :: LinksForbiddenLibrariesError ( ..) ) => {
337
- should_repair = true ;
338
- Ok ( policy)
342
+ Err ( err @ AuditWheelError :: LinksForbiddenLibrariesError ( ..) ) => {
343
+ // TODO: support repair for cross compiled wheels
344
+ if !cross_compiling {
345
+ should_repair = true ;
346
+ Ok ( policy)
347
+ } else {
348
+ Err ( err)
349
+ }
339
350
}
340
351
Err ( err) => Err ( err) ,
341
352
}
You can’t perform that action at this time.
0 commit comments