Bug 1314979 Support cross compilation with MINGW in windows.configure
MINGW builds do not need any of the checks that are performed in the
windows.configure file. Nor do they the D3D compiler DLL that is
needed for ANGLE, so we can skip that entire section in
old-configure.in.
MozReview-Commit-ID: DqufbgGoGy4
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -962,13 +962,15 @@ def wrap_system_includes(target, visibil
set_define('HAVE_VISIBILITY_HIDDEN_ATTRIBUTE',
depends(visibility_flags)(lambda v: bool(v) or None))
set_define('HAVE_VISIBILITY_ATTRIBUTE',
depends(visibility_flags)(lambda v: bool(v) or None))
set_config('WRAP_SYSTEM_INCLUDES', wrap_system_includes)
set_config('VISIBILITY_FLAGS', visibility_flags)
-@depends(target)
-def is_windows(target):
- return target.kernel == 'WINNT'
+# We only want to include windows.configure when we are compiling on
+# Windows, for Windows.
+@depends(target, host)
+def is_windows(target, host):
+ return host.kernel == 'WINNT' and target.kernel == 'WINNT'
include('windows.configure', when=is_windows)
--- a/old-configure.in
+++ b/old-configure.in
@@ -3113,29 +3113,31 @@ dnl ====================================
MOZ_ARG_DISABLE_BOOL(universalchardet,
[ --disable-universalchardet
Disable universal encoding detection],
MOZ_UNIVERSALCHARDET=,
MOZ_UNIVERSALCHARDET=1 )
dnl ========================================================
dnl = ANGLE OpenGL->D3D translator for WebGL
-dnl = * only applies to win32
+dnl = * only applies to win32 (and then, not MINGW)
dnl ========================================================
MOZ_ANGLE_RENDERER=
MOZ_D3D_CPU_SUFFIX=
MOZ_HAS_WINSDK_WITH_D3D=
MOZ_D3DCOMPILER_VISTA_DLL=
MOZ_D3DCOMPILER_VISTA_DLL_PATH=
if test "$COMPILE_ENVIRONMENT" ; then
case "$target_os" in
*mingw*)
- MOZ_ANGLE_RENDERER=1
+ if test "$OS_ARCH" = "$HOST_OS_ARCH"; then
+ MOZ_ANGLE_RENDERER=1
+ fi
;;
esac
# The DirectX SDK libraries are split into x86 and x64 sub-directories
case "${target_cpu}" in
i*86)
MOZ_D3D_CPU_SUFFIX=x86
;;