Skip to content

Commit

Permalink
don't show deprecation warning without OS
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Sep 28, 2021
1 parent e3e5cc2 commit b4f49fa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dist/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,10 @@ impl TargetTriple {
.ok_or_else(|| anyhow!(format!("Unable to parse target triple: {}", self.0)))?;
let partial_other = PartialTargetTriple::new(&other.0)
.ok_or_else(|| anyhow!(format!("Unable to parse target triple: {}", other.0)))?;
// First obvious check is OS, if that doesn't match there's no chance
// First obvious check is OS, if that doesn't match then we know it
// can't run unless an OS isn't specified
let ret = if partial_self.os != partial_other.os {
false
partial_other.os.is_none()
} else if partial_self.os.as_deref() == Some("pc-windows") {
// Windows is a special case here, we know we can run 32bit on 64bit
// and we know we can run gnu and msvc on the same system
Expand Down Expand Up @@ -1131,8 +1132,8 @@ mod tests {
(
// 64bit linux
"x86_64-unknown-linux-gnu",
// Not compatible beyond itself
&[],
// Not compatible beyond a matching arch
&["x86_64"],
// Even 32bit linux is considered not compatible by default
&["i686-unknown-linux-gnu"],
),
Expand Down

0 comments on commit b4f49fa

Please sign in to comment.