Skip to content

Commit

Permalink
No repair support for cross compiled wheel yet
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 12, 2021
1 parent 0487d5f commit c7f7c8c
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/auditwheel/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ pub fn auditwheel_rs(
if !target.is_linux() || platform_tag == Some(PlatformTag::Linux) {
return Ok((Policy::default(), false));
}
let cross_compiling = target.cross_compiling();
let arch = target.target_arch().to_string();
let mut file = File::open(path).map_err(AuditWheelError::IoError)?;
let mut buffer = Vec::new();
Expand Down Expand Up @@ -298,10 +299,15 @@ pub fn auditwheel_rs(
should_repair = false;
break;
}
Err(AuditWheelError::LinksForbiddenLibrariesError(..)) => {
highest_policy = Some(policy.clone());
should_repair = true;
break;
Err(err @ AuditWheelError::LinksForbiddenLibrariesError(..)) => {
// TODO: support repair for cross compiled wheels
if !cross_compiling {
highest_policy = Some(policy.clone());
should_repair = true;
break;
} else {
return Err(err);
}
}
Err(AuditWheelError::VersionedSymbolTooNewError(..))
| Err(AuditWheelError::BlackListedSymbolsError(..))
Expand Down Expand Up @@ -333,9 +339,14 @@ pub fn auditwheel_rs(
should_repair = false;
Ok(policy)
}
Err(AuditWheelError::LinksForbiddenLibrariesError(..)) => {
should_repair = true;
Ok(policy)
Err(err @ AuditWheelError::LinksForbiddenLibrariesError(..)) => {
// TODO: support repair for cross compiled wheels
if !cross_compiling {
should_repair = true;
Ok(policy)
} else {
Err(err)
}
}
Err(err) => Err(err),
}
Expand Down

0 comments on commit c7f7c8c

Please sign in to comment.