From f5d146524f9f7ceceb9131c23b338fd9801a4f89 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 17 May 2022 19:04:24 +0800 Subject: [PATCH] Don't consider compile to i686 on x86_64 Windows cross compiling --- src/cross_compile.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cross_compile.rs b/src/cross_compile.rs index b32c9f8a3..f9cc8adc4 100644 --- a/src/cross_compile.rs +++ b/src/cross_compile.rs @@ -23,6 +23,11 @@ pub fn is_cross_compiling(target: &Target) -> Result { 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])