Skip to content

Commit

Permalink
Don't consider compile to i686 on x86_64 Windows cross compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed May 17, 2022
1 parent 1fbf20f commit f5d1465
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ pub fn is_cross_compiling(target: &Target) -> Result<bool> {
return Ok(false);
}

if target_triple.starts_with("i686-pc-windows") && host.starts_with("x86_64-pc-windows") {
// Not cross-compiling to compile for 32-bit Python from windows 64-bit
return Ok(false);
}

if let Some(target_without_env) = target_triple
.rfind('-')
.map(|index| &target_triple[0..index])
Expand Down

0 comments on commit f5d1465

Please sign in to comment.