Merge pull request #1179 from alex/patch-1

Don't consider it cross-compilation when building for 32-bit Windows on 64-bit windows
This commit is contained in:
Yuji Kanagawa 2020-09-13 15:08:35 +09:00 committed by GitHub
commit 448f0bb738
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
### Changed
### Removed
### Fixed
- Fix building for a 32-bit Python on 64-bit Windows with a 64-bit Rust toolchain. [#1179](https://github.com/PyO3/pyo3/pull/1179)
## [0.12.0] - 2020-09-12
### Added

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);
}