зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1397263 - move MIDL_FLAGS to toolkit/moz.configure; r=glandium
This is a straightforward port of MIDL_FLAGS from old-configure to moz.configure. The only behavioral change is that it removes support for prepending MIDL_FLAGS from the environment in configure, but I doubt anyone uses that.
This commit is contained in:
Родитель
9a1e9149b8
Коммит
f05bb2799a
|
@ -263,19 +263,6 @@ case "$target" in
|
|||
|
||||
INCREMENTAL_LINKER=1
|
||||
|
||||
# Set midl environment
|
||||
case "$target" in
|
||||
i*86-*)
|
||||
MIDL_FLAGS="${MIDL_FLAGS} -env win32"
|
||||
;;
|
||||
x86_64-*)
|
||||
MIDL_FLAGS="${MIDL_FLAGS} -env x64"
|
||||
;;
|
||||
aarch64-*)
|
||||
MIDL_FLAGS="${MIDL_FLAGS} -env arm64"
|
||||
;;
|
||||
esac
|
||||
|
||||
unset _MSVC_VER_FILTER
|
||||
|
||||
WRAP_STL_INCLUDES=1
|
||||
|
@ -318,17 +305,6 @@ case "$target" in
|
|||
AC_MSG_ERROR([windres version $WINDRES_VERSION or higher is required to build.])
|
||||
fi
|
||||
|
||||
if test -n "$MIDL"; then
|
||||
case "$target" in
|
||||
i*86-*)
|
||||
MIDL_FLAGS="$MIDL_FLAGS --win32 -m32"
|
||||
;;
|
||||
x86_64-*)
|
||||
MIDL_FLAGS="$MIDL_FLAGS --win64 -m64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# strsafe.h on mingw uses macros for function deprecation that pollutes namespace
|
||||
# causing problems with local implementations with the same name.
|
||||
AC_DEFINE(STRSAFE_NO_DEPRECATE)
|
||||
|
@ -355,7 +331,6 @@ fi
|
|||
|
||||
fi # COMPILE_ENVIRONMENT
|
||||
|
||||
AC_SUBST(MIDL_FLAGS)
|
||||
AC_SUBST(_MSC_VER)
|
||||
|
||||
AC_SUBST(GNU_AS)
|
||||
|
|
|
@ -1103,8 +1103,27 @@ def check_for_midl(target, compile_environment):
|
|||
|
||||
midl = check_prog('MIDL', midl_names, when=check_for_midl, allow_missing=True)
|
||||
|
||||
# Needed until we move MIDL_FLAGS and --disable-accessibility from old-configure
|
||||
|
||||
@depends(c_compiler, target, when=depends(midl, target)(lambda m, t: m and t.kernel == 'WINNT'))
|
||||
def midl_flags(c_compiler, target):
|
||||
if c_compiler and c_compiler.type in ('msvc', 'clang-cl'):
|
||||
env = {
|
||||
'x86': 'win32',
|
||||
'x86_64': 'x64',
|
||||
'aarch64': 'arm64',
|
||||
}[target.cpu]
|
||||
return ['-env', env]
|
||||
|
||||
# mingw
|
||||
return {
|
||||
'x86': ['--win32', '-m32'],
|
||||
'x86_64': ['--win64', '-m64'],
|
||||
}[target.cpu]
|
||||
|
||||
|
||||
# Needed until we move --disable-accessibility from old-configure
|
||||
add_old_configure_assignment('MIDL', midl)
|
||||
set_config('MIDL_FLAGS', midl_flags)
|
||||
|
||||
# Addon signing
|
||||
# ==============================================================
|
||||
|
|
Загрузка…
Ссылка в новой задаче