Don't consider it cross-compilation when building for 32-bit Windows on 64-bit windows

This commit is contained in:
Alex Gaynor 2020-09-12 19:10:02 -04:00 committed by GitHub
parent b7f45c4fbf
commit 62ad53f9fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -148,7 +148,9 @@ impl CrossCompileConfig {
}
fn cross_compiling() -> Result<Option<CrossCompileConfig>> {
if env::var("TARGET")? == env::var("HOST")? {
let target = env::var("TARGET")?;
let host = env::var("HOST")?;
if target == host || (target == "i686-pc-windows-msvc" && host == "x86_64-pc-windows-msvc") {
return Ok(None);
}