Bug 1289289 - Move --with-windows-version to python configure. r=chmanchester

Also, don't set the MOZ_WINSDK_TARGETVER define anymore, as it's unused.

--HG--
extra : rebase_source : a6aa1458985d6c158abdc7cd7926b73990f4df2a
This commit is contained in:
Mike Hommey 2016-07-22 17:08:53 +09:00
parent 4fdd5ca717
commit 1b9c70450b
5 changed files with 33 additions and 40 deletions

View File

@ -322,7 +322,6 @@ def old_configure_options(*options):
'--with-thumb-interwork',
'--with-unify-dist',
'--with-user-appdir',
'--with-windows-version',
'--x-includes',
'--x-libraries',

View File

@ -856,4 +856,5 @@ def libcxx_inline_visibility(c_compiler, target):
set_define('_LIBCPP_INLINE_VISIBILITY', libcxx_inline_visibility)
set_define('_LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49', libcxx_inline_visibility)
include('windows.configure')
include('rust.configure')

View File

@ -0,0 +1,32 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
option('--with-windows-version', nargs=1, default='603',
help='Windows SDK version to target. Win 8.1 (603) is currently'
'the minimum supported version.')
@depends(target)
def is_windows(target):
return target.kernel == 'WINNT'
@depends_when('--with-windows-version', when=is_windows)
@imports(_from='__builtin__', _import='ValueError')
def valid_windows_version(value):
if not value:
die('Cannot build with --without-windows-version')
try:
version = int(value[0], 16)
if version in (0x603,):
return version
except ValueError:
pass
die('Invalid value for --with-windows-version (%s)', value[0])
add_old_configure_assignment(
'MOZ_WINSDK_TARGETVER',
depends(valid_windows_version)(lambda x: '%04x0000' % x if x else None))

View File

@ -149,26 +149,8 @@ dnl Special win32 checks
dnl ========================================================
# Target the Windows 8.1 SDK by default
WINSDK_TARGETVER=603
WINVER=502
MOZ_ARG_WITH_STRING(windows-version,
[ --with-windows-version=WINSDK_TARGETVER
Windows SDK version to target. Win8.1 (603) is
currently the minimum supported version.],
WINSDK_TARGETVER=$withval)
# Currently only version 603 is allowed
case "$WINSDK_TARGETVER" in
603)
MOZ_WINSDK_TARGETVER=0${WINSDK_TARGETVER}0000
;;
*)
AC_MSG_ERROR([Invalid value for --with-windows-version ($WINSDK_TARGETVER)]);
;;
esac
case "$target" in
*-mingw*)
if test "$GCC" != "yes"; then
@ -325,7 +307,6 @@ case "$target" in
AC_MSG_ERROR([You are targeting Windows version 0x$MOZ_WINSDK_TARGETVER, but your SDK only supports up to version $MOZ_WINSDK_MAXVER. Install and use an updated SDK, or target a lower version using --with-windows-version. Alternatively, try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this.])
fi
AC_DEFINE_UNQUOTED(MOZ_WINSDK_TARGETVER,0x$MOZ_WINSDK_TARGETVER)
;;
esac

View File

@ -255,27 +255,8 @@ dnl ========================================================
dnl Special win32 checks
dnl ========================================================
# Target the Windows 8.1 SDK by default
WINSDK_TARGETVER=603
WINVER=502
MOZ_ARG_WITH_STRING(windows-version,
[ --with-windows-version=WINSDK_TARGETVER
Windows SDK version to target. Win8.1 (603) is
currently the minimum supported version.],
WINSDK_TARGETVER=$withval)
# Currently only version 603 is allowed
case "$WINSDK_TARGETVER" in
603)
MOZ_WINSDK_TARGETVER=0${WINSDK_TARGETVER}0000
;;
*)
AC_MSG_ERROR([Invalid value for --with-windows-version ($WINSDK_TARGETVER)]);
;;
esac
case "$target" in
*-mingw*)
if test "$GCC" != "yes"; then
@ -507,7 +488,6 @@ case "$target" in
AC_MSG_ERROR([You are targeting Windows version 0x$MOZ_WINSDK_TARGETVER, but your SDK only supports up to version $MOZ_WINSDK_MAXVER. Install and use an updated SDK, or target a lower version using --with-windows-version. Alternatively, try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this.])
fi
AC_DEFINE_UNQUOTED(MOZ_WINSDK_TARGETVER,0x$MOZ_WINSDK_TARGETVER)
;;
esac