Bug 1359552 ANGLE requires MOZ_HAS_WINSDK_WITH_D3D to be set for required includes in MINGW
The first attempt at this patch in
Bug 1314979 turned off the entire
ANGLE section for MINGW builds on Linux for Windows. This was
incorrect, as it also turned off includes of very important files
like d3d11.h
This changes it so we go through the ANGLE section, but if we don't find
a Windows SDK we only consider that an error when we're compiling with
MinGW for Windows _on_ Windows. If the Host and Target OSes don't match
(meaning we're compiling on Linux for Windows) we ignore the lack of a
Windows SDK.
MozReview-Commit-ID: KyggI6yJCEM
--- a/old-configure.in
+++ b/old-configure.in
@@ -3129,19 +3129,17 @@ 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*)
- if test "$OS_ARCH" = "$HOST_OS_ARCH"; then
- MOZ_ANGLE_RENDERER=1
- fi
+ MOZ_ANGLE_RENDERER=1
;;
esac
# The DirectX SDK libraries are split into x86 and x64 sub-directories
case "${target_cpu}" in
i*86)
MOZ_D3D_CPU_SUFFIX=x86
;;
@@ -3183,17 +3181,21 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
AC_MSG_RESULT([MOZ_D3DCOMPILER_VISTA_DLL_PATH doesn't exist: $MOZ_D3DCOMPILER_VISTA_DLL_PATH])
AC_MSG_ERROR([Windows SDK at "$WINDOWSSDKDIR" appears broken. Try updating to MozillaBuild 1.9 final or higher.])
MOZ_D3DCOMPILER_VISTA_DLL_PATH=
fi
else
AC_MSG_RESULT([Windows SDK not found.])
fi
else
- AC_MSG_ERROR([Couldn't find Windows SDK 8.1 or higher needed for ANGLE.])
+ if test "$OS_ARCH" = "$HOST_OS_ARCH"; then
+ AC_MSG_ERROR([Couldn't find Windows SDK 8.1 or higher needed for ANGLE.])
+ else
+ AC_MSG_RESULT([Windows SDK not needed for ANGLE in Linux MinGW build.])
+ fi
fi
if test -z "$MOZ_D3DCOMPILER_VISTA_DLL_PATH"; then
MOZ_D3DCOMPILER_VISTA_DLL=
fi
# On mingw, check if headers are provided by toolchain.
if test -n "$GNU_CC"; then