Skip to content

Commit

Permalink
Bug 1460620 - Have MinGW look for d3dcompiler_47.dll (so it will be p…
Browse files Browse the repository at this point in the history
…ackaged) r=froydnj

--HG--
extra : amend_source : b9979cc3b72aa5f962342b150c525867eba82654
  • Loading branch information
tomrittervg committed Jan 8, 2019
1 parent d441a60 commit d1481c6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
32 changes: 21 additions & 11 deletions old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2212,12 +2212,17 @@ if test -n "$MOZ_ANGLE_RENDERER"; then

# Find a D3D compiler DLL in a Windows SDK.
MOZ_D3DCOMPILER_VISTA_DLL=
case "$MOZ_WINSDK_MAXVER" in
0x0603*|0x0A00*)
if test "$OS_ARCH" != "$HOST_OS_ARCH"; then
MOZ_D3DCOMPILER_VISTA_DLL=d3dcompiler_47.dll
AC_MSG_RESULT([Found D3D compiler in Windows SDK.])
;;
esac
AC_MSG_RESULT([Assuming D3D compiler will be in fxc2.])
else
case "$MOZ_WINSDK_MAXVER" in
0x0603*|0x0A00*)
MOZ_D3DCOMPILER_VISTA_DLL=d3dcompiler_47.dll
AC_MSG_RESULT([Found D3D compiler in Windows SDK.])
;;
esac
fi

if test -n "$MOZ_D3DCOMPILER_VISTA_DLL"; then
# We have a name, now track down the path.
Expand All @@ -2235,13 +2240,20 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
MOZ_D3DCOMPILER_VISTA_DLL_PATH=
fi
else
AC_MSG_RESULT([Windows SDK not found.])
MOZ_D3DCOMPILER_VISTA_DLL_PATH="$(dirname $FXC)/$MOZ_D3DCOMPILER_VISTA_DLL"
if test -f "$MOZ_D3DCOMPILER_VISTA_DLL_PATH"; then
AC_MSG_RESULT([Found MOZ_D3DCOMPILER_VISTA_DLL_PATH: $MOZ_D3DCOMPILER_VISTA_DLL_PATH])
else
AC_MSG_RESULT([MOZ_D3DCOMPILER_VISTA_DLL_PATH doesn't exist: $MOZ_D3DCOMPILER_VISTA_DLL_PATH])
AC_MSG_ERROR([fxc2 or "$MOZ_D3DCOMPILER_VISTA_DLL" seem to be missing from the expected location.])
MOZ_D3DCOMPILER_VISTA_DLL_PATH=
fi
fi
else
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.])
AC_MSG_ERROR([We should need "$MOZ_D3DCOMPILER_VISTA_DLL" for ANGLE in Linux MinGW build, but we didn't look for it.])
fi
fi

Expand All @@ -2263,10 +2275,8 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
AC_MSG_RESULT([Found d3dcompiler DLL for Vista+: $MOZ_D3DCOMPILER_VISTA_DLL])
fi

if test -z "$CROSS_COMPILE"; then
if test -z "MOZ_FOUND_A_D3D_COMPILER"; then
AC_MSG_ERROR([Couldn't find an acceptable D3D compiler DLL.])
fi
if test -z "MOZ_FOUND_A_D3D_COMPILER"; then
AC_MSG_ERROR([Couldn't find an acceptable D3D compiler DLL.])
fi
fi # MOZ_ANGLE_RENDERER

Expand Down
1 change: 1 addition & 0 deletions toolkit/moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@ set_config('MOZ_LAYOUT_DEBUGGER', depends_if('--enable-layout-debugger')(lambda
with only_when(compile_environment):
fxc = check_prog('FXC', ('fxc.exe', 'fxc2.exe'), when=depends(target)
(lambda t: t.kernel == 'WINNT'))
add_old_configure_assignment('FXC', fxc)
wine = check_prog('WINE', ['wine'], when=depends(target, host)
(lambda t, h: t.kernel == 'WINNT' and h.kernel == 'Linux'))

Expand Down

0 comments on commit d1481c6

Please sign in to comment.