зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1299919 - Set CPP/CXXCPP from python configure. r=chmanchester
This commit is contained in:
Родитель
9eb3978fde
Коммит
935ad653b8
|
@ -2,6 +2,14 @@ dnl This Source Code Form is subject to the terms of the Mozilla Public
|
|||
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
dnl Several autoconf functions AC_REQUIRE AC_PROG_CPP/AC_PROG_CXXCPP,
|
||||
dnl meaning they are called even when we don't call them explicitly.
|
||||
dnl However, theses checks are not necessary and python configure sets
|
||||
dnl the corresponding variables already, so just skip those tests
|
||||
dnl entirely.
|
||||
define([AC_PROG_CPP],[])
|
||||
define([AC_PROG_CXXCPP],[])
|
||||
|
||||
AC_DEFUN([MOZ_TOOL_VARIABLES],
|
||||
[
|
||||
GNU_AS=
|
||||
|
|
|
@ -754,6 +754,23 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
|
|||
valid_compiler.try_compile(check_msg='%s works' % what,
|
||||
onerror=compiler_error)
|
||||
|
||||
|
||||
# Set CPP/CXXCPP for both the build system and old-configure. We don't
|
||||
# need to check this works for preprocessing, because we already relied
|
||||
# on $CC -E/$CXX -E doing preprocessing work to validate the compiler
|
||||
# in the first place.
|
||||
if host_or_target == target:
|
||||
pp_var = {
|
||||
'C': 'CPP',
|
||||
'C++': 'CXXCPP',
|
||||
}[language]
|
||||
|
||||
preprocessor = depends_if(valid_compiler)(
|
||||
lambda x: list(x.wrapper) + [x.compiler, '-E'] + list(x.flags))
|
||||
|
||||
set_config(pp_var, preprocessor)
|
||||
add_old_configure_assignment(pp_var, preprocessor)
|
||||
|
||||
return valid_compiler
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ def generateLine(propName, extendedAttrs):
|
|||
return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs),
|
||||
propName)
|
||||
def generate(output, idlFilename, preprocessorHeader):
|
||||
cpp = shellutil.split(buildconfig.substs['CPP'])
|
||||
cpp = list(buildconfig.substs['CPP'])
|
||||
cpp += shellutil.split(buildconfig.substs['ACDEFINES'])
|
||||
cpp.append(preprocessorHeader)
|
||||
preprocessed = subprocess.check_output(cpp)
|
||||
|
|
|
@ -140,9 +140,6 @@ fi
|
|||
|
||||
MOZ_TOOL_VARIABLES
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXXCPP
|
||||
|
||||
dnl Special win32 checks
|
||||
dnl ========================================================
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import buildconfig
|
|||
from mozbuild import shellutil
|
||||
|
||||
def get_properties(preprocessorHeader):
|
||||
cpp = shellutil.split(buildconfig.substs['CPP'])
|
||||
cpp = list(buildconfig.substs['CPP'])
|
||||
cpp += shellutil.split(buildconfig.substs['ACDEFINES'])
|
||||
cpp.append(preprocessorHeader)
|
||||
preprocessed = subprocess.check_output(cpp)
|
||||
|
|
|
@ -241,9 +241,6 @@ fi
|
|||
|
||||
MOZ_TOOL_VARIABLES
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXXCPP
|
||||
|
||||
dnl ========================================================
|
||||
dnl Special win32 checks
|
||||
dnl ========================================================
|
||||
|
|
Загрузка…
Ссылка в новой задаче