summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-10-28 08:05:42 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-10-28 09:54:49 +0530
commit7b52478167525427bca2b00813d7e00204c8bf6e (patch)
tree7aa8b29c573c6b6bc74208a4e431f7b548611240
parent3d072ccc591ce8a1c5a6a7a542e5d4a3c05e0eef (diff)
cerbero: 32-bit on 64-bit Windows is not cross-compilation
On Windows, building 32-bit on 64-bit is not cross-compilation since 32-bit Windows binaries run on 64-bit Windows via WOW64. It is indistinguishable from native compilation especially in our case since our environment decides what toolchain we will use. In fact, our MinGW toolchain consists of native 32-bit binaries being run in 64-bit and building for 32-bit. The toolchain itself thinks it is running on 32-bit.
-rw-r--r--cerbero/config.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/cerbero/config.py b/cerbero/config.py
index 3cfd2b63..79900262 100644
--- a/cerbero/config.py
+++ b/cerbero/config.py
@@ -383,6 +383,12 @@ class Config (object):
def cross_compiling(self):
"Are we building for the host platform or not?"
+ # On Windows, building 32-bit on 64-bit is not cross-compilation since
+ # 32-bit Windows binaries run on 64-bit Windows via WOW64.
+ if self.platform == Platform.WINDOWS:
+ if self.arch == Architecture.X86_64 and \
+ self.target_arch == Architecture.X86:
+ return False
return self.target_platform != self.platform or \
self.target_arch != self.arch or \
self.target_distro_version != self.distro_version