зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 1f0cfca78242 (bug 1619460) perf regression in automation, req by rstewart. CLOSED TREE
--HG-- extra : rebase_source : ef3f1ce03bc9fdedb81d33ede68f9925f447ba32
This commit is contained in:
Родитель
3c496c6b28
Коммит
4437350f38
|
@ -91,7 +91,7 @@ if CONFIG['MOZ_APP_BASENAME']:
|
|||
entry_point='generate',
|
||||
inputs=['application.ini.in'],
|
||||
flags=['-D%s=%s' % (k, '1' if v is True else v)
|
||||
for k, v in sorted(appini_defines.items(), key=lambda t: t[0])])
|
||||
for k, v in appini_defines.items()])
|
||||
|
||||
FINAL_TARGET_FILES += ['!application.ini']
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' and CONFIG['MOZ_UPDATER']:
|
||||
|
|
|
@ -26,12 +26,14 @@ else:
|
|||
'/js/src/ctypes/libffi/src/%s' % CONFIG['FFI_TARGET_DIR'],
|
||||
]
|
||||
|
||||
DEFINES['TARGET'] = CONFIG['FFI_TARGET']
|
||||
DEFINES[CONFIG['FFI_TARGET']] = True
|
||||
DEFINES['FFI_NO_RAW_API'] = True
|
||||
DEFINES['HAVE_AS_ASCII_PSEUDO_OP'] = True
|
||||
DEFINES['HAVE_AS_STRING_PSEUDO_OP'] = True
|
||||
DEFINES['HAVE_AS_X86_64_UNWIND_SECTION_TYPE'] = True
|
||||
DEFINES.update({
|
||||
'TARGET': CONFIG['FFI_TARGET'],
|
||||
CONFIG['FFI_TARGET']: True,
|
||||
'FFI_NO_RAW_API': True,
|
||||
'HAVE_AS_ASCII_PSEUDO_OP': True,
|
||||
'HAVE_AS_STRING_PSEUDO_OP': True,
|
||||
'HAVE_AS_X86_64_UNWIND_SECTION_TYPE': True,
|
||||
})
|
||||
|
||||
if CONFIG['MOZ_DEBUG']:
|
||||
DEFINES['FFI_DEBUG'] = True
|
||||
|
|
|
@ -6,23 +6,26 @@
|
|||
|
||||
# Also see <http://www.icu-project.org/repos/icu/tags/latest/icu4c/readme.html#RecBuild> for the
|
||||
# recommended build options when compiling ICU.
|
||||
# Don't use icu namespace automatically in client code.
|
||||
DEFINES['U_USING_ICU_NAMESPACE'] = 0
|
||||
# Don't include obsolete header files.
|
||||
DEFINES['U_NO_DEFAULT_INCLUDE_UTF_HEADERS'] = 1
|
||||
DEFINES['U_HIDE_OBSOLETE_UTF_OLD_H'] = 1
|
||||
DEFINES.update(
|
||||
# Don't use icu namespace automatically in client code.
|
||||
U_USING_ICU_NAMESPACE = 0,
|
||||
|
||||
# Remove chunks of the library that we don't need (yet).
|
||||
DEFINES['UCONFIG_NO_LEGACY_CONVERSION'] = True
|
||||
DEFINES['UCONFIG_NO_TRANSLITERATION'] = True
|
||||
DEFINES['UCONFIG_NO_REGULAR_EXPRESSIONS'] = True
|
||||
# Don't include obsolete header files.
|
||||
U_NO_DEFAULT_INCLUDE_UTF_HEADERS = 1,
|
||||
U_HIDE_OBSOLETE_UTF_OLD_H = 1,
|
||||
|
||||
# We don't need to pass data to and from legacy char* APIs.
|
||||
DEFINES['U_CHARSET_IS_UTF8'] = True
|
||||
# Remove chunks of the library that we don't need (yet).
|
||||
UCONFIG_NO_LEGACY_CONVERSION = True,
|
||||
UCONFIG_NO_TRANSLITERATION = True,
|
||||
UCONFIG_NO_REGULAR_EXPRESSIONS = True,
|
||||
|
||||
# Add 'explicit' keyword to UnicodeString constructors.
|
||||
DEFINES['UNISTR_FROM_CHAR_EXPLICIT'] = "explicit"
|
||||
DEFINES['UNISTR_FROM_STRING_EXPLICIT'] = "explicit"
|
||||
# We don't need to pass data to and from legacy char* APIs.
|
||||
U_CHARSET_IS_UTF8 = True,
|
||||
|
||||
# Add 'explicit' keyword to UnicodeString constructors.
|
||||
UNISTR_FROM_CHAR_EXPLICIT = "explicit",
|
||||
UNISTR_FROM_STRING_EXPLICIT = "explicit",
|
||||
)
|
||||
|
||||
if not CONFIG['HAVE_LANGINFO_CODESET']:
|
||||
DEFINES['U_HAVE_NL_LANGINFO_CODESET'] = 0
|
||||
|
|
|
@ -16,10 +16,12 @@ AllowCompilerWarnings()
|
|||
DEFINES['_NSPR_BUILD_'] = True
|
||||
if CONFIG['OS_ARCH'] == 'Linux':
|
||||
OS_LIBS += CONFIG['REALTIME_LIBS']
|
||||
DEFINES['LINUX'] = True
|
||||
DEFINES['HAVE_FCNTL_FILE_LOCKING'] = True
|
||||
DEFINES['HAVE_POINTER_LOCALTIME_R'] = True
|
||||
DEFINES['_GNU_SOURCE'] = True
|
||||
DEFINES.update(
|
||||
LINUX=True,
|
||||
HAVE_FCNTL_FILE_LOCKING=True,
|
||||
HAVE_POINTER_LOCALTIME_R=True,
|
||||
_GNU_SOURCE=True,
|
||||
)
|
||||
SOURCES += ['/nsprpub/pr/src/md/unix/linux.c']
|
||||
if CONFIG['CPU_ARCH'] == 'x86_64':
|
||||
SOURCES += ['/nsprpub/pr/src/md/unix/os_Linux_x86_64.s']
|
||||
|
@ -29,9 +31,11 @@ if CONFIG['OS_ARCH'] == 'Linux':
|
|||
elif CONFIG['CPU_ARCH'] == 'ppc':
|
||||
SOURCES += ['/nsprpub/pr/src/md/unix/os_Linux_ppc.s']
|
||||
elif CONFIG['OS_TARGET'] in ('FreeBSD', 'OpenBSD', 'NetBSD'):
|
||||
DEFINES['HAVE_BSD_FLOCK'] = True
|
||||
DEFINES['HAVE_SOCKLEN_T'] = True
|
||||
DEFINES['HAVE_POINTER_LOCALTIME_R'] = True
|
||||
DEFINES.update(
|
||||
HAVE_BSD_FLOCK=True,
|
||||
HAVE_SOCKLEN_T=True,
|
||||
HAVE_POINTER_LOCALTIME_R=True,
|
||||
)
|
||||
DEFINES[CONFIG['OS_TARGET'].upper()] = True
|
||||
SOURCES += ['/nsprpub/pr/src/md/unix/%s.c' % CONFIG['OS_TARGET'].lower()]
|
||||
elif CONFIG['OS_TARGET'] == 'Darwin':
|
||||
|
@ -40,13 +44,19 @@ elif CONFIG['OS_TARGET'] == 'Darwin':
|
|||
DEFINES['FD_SETSIZE'] = 4096
|
||||
DEFINES['_DARWIN_UNLIMITED_SELECT'] = True
|
||||
if not CONFIG['HOST_MAJOR_VERSION']:
|
||||
DEFINES['HAS_CONNECTX'] = True
|
||||
DEFINES.update(
|
||||
HAS_CONNECTX=True,
|
||||
)
|
||||
elif CONFIG['HOST_MAJOR_VERSION'] >= '15':
|
||||
DEFINES['HAS_CONNECTX'] = True
|
||||
DEFINES['DARWIN'] = True
|
||||
DEFINES['HAVE_BSD_FLOCK'] = True
|
||||
DEFINES['HAVE_SOCKLEN_T'] = True
|
||||
DEFINES['HAVE_POINTER_LOCALTIME_R'] = True
|
||||
DEFINES.update(
|
||||
HAS_CONNECTX=True,
|
||||
)
|
||||
DEFINES.update(
|
||||
DARWIN=True,
|
||||
HAVE_BSD_FLOCK=True,
|
||||
HAVE_SOCKLEN_T=True,
|
||||
HAVE_POINTER_LOCALTIME_R=True,
|
||||
)
|
||||
SOURCES += [
|
||||
'/nsprpub/pr/src/md/unix/darwin.c',
|
||||
'/nsprpub/pr/src/md/unix/os_Darwin.s',
|
||||
|
@ -54,10 +64,12 @@ elif CONFIG['OS_TARGET'] == 'Darwin':
|
|||
if not CONFIG['MOZ_IOS']:
|
||||
DEFINES['HAVE_CRT_EXTERNS_H'] = True
|
||||
elif CONFIG['OS_TARGET'] == 'SunOS':
|
||||
DEFINES['HAVE_FCNTL_FILE_LOCKING'] = True
|
||||
DEFINES['HAVE_SOCKLEN_T'] = True
|
||||
DEFINES['_PR_HAVE_OFF64_T'] = True
|
||||
DEFINES['_PR_INET6'] = True
|
||||
DEFINES.update(
|
||||
HAVE_FCNTL_FILE_LOCKING=True,
|
||||
HAVE_SOCKLEN_T=True,
|
||||
_PR_HAVE_OFF64_T=True,
|
||||
_PR_INET6=True,
|
||||
)
|
||||
DEFINES['SOLARIS'] = True
|
||||
SOURCES += ['/nsprpub/pr/src/md/unix/solaris.c']
|
||||
if CONFIG['CPU_ARCH'] == 'x86_64':
|
||||
|
@ -74,13 +86,15 @@ elif CONFIG['OS_TARGET'] == 'WINNT':
|
|||
'mswsock',
|
||||
'winmm',
|
||||
]
|
||||
DEFINES['XP_PC'] = True
|
||||
DEFINES['WIN32'] = True
|
||||
DEFINES.update(
|
||||
XP_PC=True,
|
||||
WIN32=True,
|
||||
# For historical reasons we use the WIN95 NSPR target instead of
|
||||
# WINNT.
|
||||
DEFINES['WIN95'] = True
|
||||
DEFINES['WINNT'] = False
|
||||
DEFINES['_PR_GLOBAL_THREADS_ONLY'] = True
|
||||
WIN95=True,
|
||||
WINNT=False,
|
||||
_PR_GLOBAL_THREADS_ONLY=True,
|
||||
)
|
||||
if not CONFIG['DEBUG']:
|
||||
DEFINES['DO_NOT_WAIT_FOR_CONNECT_OVERLAPPED_OPERATIONS'] = True
|
||||
if CONFIG['CPU_ARCH'] == 'x86_64':
|
||||
|
|
|
@ -33,8 +33,10 @@ PYTHON_UNITTEST_MANIFESTS += [
|
|||
if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['MOZ_OPTIMIZE']:
|
||||
CFLAGS += ['-O3']
|
||||
|
||||
HOST_DEFINES['UNICODE'] = True
|
||||
HOST_DEFINES['_UNICODE'] = True
|
||||
HOST_DEFINES = {
|
||||
'UNICODE': True,
|
||||
'_UNICODE': True,
|
||||
}
|
||||
|
||||
include('stl-headers.mozbuild')
|
||||
if CONFIG['WRAP_STL_INCLUDES']:
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
# 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/.
|
||||
|
||||
DEFINES['IMPL_LIBXUL'] = True
|
||||
DEFINES['MOZILLA_INTERNAL_API'] = True
|
||||
DEFINES.update({
|
||||
'IMPL_LIBXUL': True,
|
||||
'MOZILLA_INTERNAL_API': True,
|
||||
})
|
||||
|
||||
# Do NOT export this library. We don't actually want our test code
|
||||
# being added to libxul or anything.
|
||||
|
|
|
@ -16,18 +16,20 @@ if CONFIG['OS_ARCH'] == 'WINNT':
|
|||
'dbghelp',
|
||||
]
|
||||
|
||||
DEFINES['UNICODE'] = True
|
||||
DEFINES['_UNICODE'] = True
|
||||
DEFINES['_CRT_RAND_S'] = True
|
||||
DEFINES['CERT_CHAIN_PARA_HAS_EXTRA_FIELDS'] = True
|
||||
DEFINES['_SECURE_ATL'] = True
|
||||
DEFINES['CHROMIUM_BUILD'] = True
|
||||
DEFINES['U_STATIC_IMPLEMENTATION'] = True
|
||||
DEFINES['OS_WIN'] = 1
|
||||
DEFINES['WIN32'] = True
|
||||
DEFINES['_WIN32'] = True
|
||||
DEFINES['_WINDOWS'] = True
|
||||
DEFINES['WIN32_LEAN_AND_MEAN'] = True
|
||||
DEFINES.update({
|
||||
'UNICODE': True,
|
||||
'_UNICODE': True,
|
||||
'_CRT_RAND_S': True,
|
||||
'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS': True,
|
||||
'_SECURE_ATL': True,
|
||||
'CHROMIUM_BUILD': True,
|
||||
'U_STATIC_IMPLEMENTATION': True,
|
||||
'OS_WIN': 1,
|
||||
'WIN32': True,
|
||||
'_WIN32': True,
|
||||
'_WINDOWS': True,
|
||||
'WIN32_LEAN_AND_MEAN': True,
|
||||
})
|
||||
|
||||
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
DEFINES['COMPILER_MSVC'] = True
|
||||
|
@ -42,20 +44,28 @@ else:
|
|||
DEFINES['OS_SOLARIS'] = 1
|
||||
|
||||
elif CONFIG['OS_ARCH'] == 'DragonFly':
|
||||
DEFINES['OS_DRAGONFLY'] = 1
|
||||
DEFINES['OS_BSD'] = 1
|
||||
DEFINES.update({
|
||||
'OS_DRAGONFLY': 1,
|
||||
'OS_BSD': 1,
|
||||
})
|
||||
|
||||
elif CONFIG['OS_ARCH'] == 'FreeBSD' or CONFIG['OS_ARCH'] == 'GNU_kFreeBSD':
|
||||
DEFINES['OS_FREEBSD'] = 1
|
||||
DEFINES['OS_BSD'] = 1
|
||||
DEFINES.update({
|
||||
'OS_FREEBSD': 1,
|
||||
'OS_BSD': 1,
|
||||
})
|
||||
|
||||
elif CONFIG['OS_ARCH'] == 'NetBSD':
|
||||
DEFINES['OS_NETBSD'] = 1
|
||||
DEFINES['OS_BSD'] = 1
|
||||
DEFINES.update({
|
||||
'OS_NETBSD': 1,
|
||||
'OS_BSD': 1,
|
||||
})
|
||||
|
||||
elif CONFIG['OS_ARCH'] == 'OpenBSD':
|
||||
DEFINES['OS_OPENBSD'] = 1
|
||||
DEFINES['OS_BSD'] = 1
|
||||
DEFINES.update({
|
||||
'OS_OPENBSD': 1,
|
||||
'OS_BSD': 1,
|
||||
})
|
||||
|
||||
else:
|
||||
DEFINES['OS_LINUX'] = 1
|
||||
|
|
|
@ -169,8 +169,12 @@ XPCOM_MANIFESTS += [
|
|||
|
||||
if CONFIG['OS_TARGET'] == 'Darwin':
|
||||
if not CONFIG['HOST_MAJOR_VERSION']:
|
||||
DEFINES['HAS_CONNECTX'] = True
|
||||
DEFINES.update(
|
||||
HAS_CONNECTX=True,
|
||||
)
|
||||
elif CONFIG['HOST_MAJOR_VERSION'] >= '15':
|
||||
DEFINES['HAS_CONNECTX'] = True
|
||||
DEFINES.update(
|
||||
HAS_CONNECTX=True,
|
||||
)
|
||||
|
||||
include('/tools/fuzzing/libfuzzer-config.mozbuild')
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
from __future__ import absolute_import, unicode_literals, print_function
|
||||
|
||||
from operator import itemgetter
|
||||
import six
|
||||
|
||||
from mozbuild.backend.base import PartialBackend
|
||||
|
@ -195,12 +194,12 @@ class FasterMakeBackend(MakeBackend, PartialBackend):
|
|||
|
||||
# Add information for install manifests.
|
||||
mk.add_statement('INSTALL_MANIFESTS = %s'
|
||||
% ' '.join(sorted(self._install_manifests.keys())))
|
||||
% ' '.join(self._install_manifests.keys()))
|
||||
|
||||
# Add dependencies we inferred:
|
||||
for target, deps in sorted(six.iteritems(self._dependencies)):
|
||||
for target, deps in six.iteritems(self._dependencies):
|
||||
mk.create_rule([target]).add_dependencies(
|
||||
'$(TOPOBJDIR)/%s' % d for d in sorted(deps))
|
||||
'$(TOPOBJDIR)/%s' % d for d in deps)
|
||||
|
||||
# This is not great, but it's better to have some dependencies on these Python files.
|
||||
python_deps = [
|
||||
|
@ -209,9 +208,9 @@ class FasterMakeBackend(MakeBackend, PartialBackend):
|
|||
'$(TOPSRCDIR)/third_party/python/compare-locales/compare_locales/paths.py',
|
||||
]
|
||||
# Add l10n dependencies we inferred:
|
||||
for target, deps in sorted(six.iteritems(self._l10n_dependencies)):
|
||||
for target, deps in six.iteritems(self._l10n_dependencies):
|
||||
mk.create_rule([target]).add_dependencies(
|
||||
'%s' % d[0] for d in sorted(deps, key=itemgetter(0)))
|
||||
'%s' % d[0] for d in deps)
|
||||
for (merge, ref_file, l10n_file) in deps:
|
||||
rule = mk.create_rule([merge]).add_dependencies(
|
||||
[ref_file, l10n_file] + python_deps)
|
||||
|
|
|
@ -14,9 +14,8 @@ from collections import (
|
|||
defaultdict,
|
||||
namedtuple,
|
||||
)
|
||||
from itertools import chain
|
||||
from operator import itemgetter
|
||||
from six import StringIO
|
||||
from itertools import chain
|
||||
|
||||
from mozpack.manifests import (
|
||||
InstallManifest,
|
||||
|
@ -746,21 +745,20 @@ class RecursiveMakeBackend(MakeBackend):
|
|||
root_deps_mk = Makefile()
|
||||
|
||||
# Fill the dependencies for traversal of each tier.
|
||||
for tier, filter in sorted(filters, key=itemgetter(0)):
|
||||
for tier, filter in filters:
|
||||
main, all_deps = \
|
||||
self._traversal.compute_dependencies(filter)
|
||||
for dir, deps in sorted(all_deps.items()):
|
||||
for dir, deps in all_deps.items():
|
||||
if deps is not None or (dir in self._idl_dirs
|
||||
and tier == 'export'):
|
||||
rule = root_deps_mk.create_rule(['%s/%s' % (dir, tier)])
|
||||
if deps:
|
||||
rule.add_dependencies(
|
||||
'%s/%s' % (d, tier) for d in sorted(deps) if d)
|
||||
rule.add_dependencies('%s/%s' % (d, tier) for d in deps if d)
|
||||
if dir in self._idl_dirs and tier == 'export':
|
||||
rule.add_dependencies(['xpcom/xpidl/%s' % tier])
|
||||
rule = root_deps_mk.create_rule(['recurse_%s' % tier])
|
||||
if main:
|
||||
rule.add_dependencies('%s/%s' % (d, tier) for d in sorted(main))
|
||||
rule.add_dependencies('%s/%s' % (d, tier) for d in main)
|
||||
|
||||
all_compile_deps = six.moves.reduce(
|
||||
lambda x, y: x | y,
|
||||
|
@ -785,8 +783,8 @@ class RecursiveMakeBackend(MakeBackend):
|
|||
# Directories containing rust compilations don't generally depend
|
||||
# on other directories in the tree, so putting them first here will
|
||||
# start them earlier in the build.
|
||||
rust_roots = sorted(r for r in roots if r in self._rust_targets)
|
||||
rust_libs = sorted(r for r in roots if r in self._rust_lib_targets)
|
||||
rust_roots = [r for r in roots if r in self._rust_targets]
|
||||
rust_libs = [r for r in roots if r in self._rust_lib_targets]
|
||||
if category == 'compile' and rust_roots:
|
||||
rust_rule = root_deps_mk.create_rule(['recurse_rust'])
|
||||
rust_rule.add_dependencies(rust_roots)
|
||||
|
@ -802,11 +800,11 @@ class RecursiveMakeBackend(MakeBackend):
|
|||
r = root_deps_mk.create_rule([target])
|
||||
r.add_dependencies([prior_target])
|
||||
|
||||
rule.add_dependencies(sorted(chain(rust_roots, roots)))
|
||||
rule.add_dependencies(chain(rust_roots, roots))
|
||||
for target, deps in sorted(graph.items()):
|
||||
if deps:
|
||||
rule = root_deps_mk.create_rule([target])
|
||||
rule.add_dependencies(sorted(deps))
|
||||
rule.add_dependencies(deps)
|
||||
|
||||
non_default_roots = defaultdict(list)
|
||||
non_default_graphs = defaultdict(lambda: OrderedDefaultDict(set))
|
||||
|
@ -832,7 +830,7 @@ class RecursiveMakeBackend(MakeBackend):
|
|||
self._no_skip['syms'].remove(dirname)
|
||||
|
||||
add_category_rules('compile', compile_roots, self._compile_graph)
|
||||
for category, graph in sorted(six.iteritems(non_default_graphs)):
|
||||
for category, graph in six.iteritems(non_default_graphs):
|
||||
add_category_rules(category, non_default_roots[category], graph)
|
||||
|
||||
root_mk = Makefile()
|
||||
|
@ -854,7 +852,7 @@ class RecursiveMakeBackend(MakeBackend):
|
|||
root_mk.add_statement('non_default_tiers := %s' % ' '.join(sorted(
|
||||
non_default_roots.keys())))
|
||||
|
||||
for category, graphs in sorted(six.iteritems(non_default_graphs)):
|
||||
for category, graphs in six.iteritems(non_default_graphs):
|
||||
category_dirs = [mozpath.dirname(target)
|
||||
for target in graphs.keys()]
|
||||
root_mk.add_statement('%s_dirs := %s' % (category,
|
||||
|
|
|
@ -305,26 +305,8 @@ class InitializedDefines(ContextDerivedValue, OrderedDict):
|
|||
for define in context.config.substs.get('MOZ_DEBUG_DEFINES', ()):
|
||||
self[define] = 1
|
||||
if value:
|
||||
if not isinstance(value, OrderedDict):
|
||||
raise ValueError('Can only initialize with another OrderedDict')
|
||||
self.update(value)
|
||||
|
||||
def update(self, *other, **kwargs):
|
||||
# Since iteration over non-ordered dicts is non-deterministic, this dict
|
||||
# will be populated in an unpredictable order unless the argument to
|
||||
# update() is also ordered. (It's important that we maintain this
|
||||
# invariant so we can be sure that running `./mach build-backend` twice
|
||||
# in a row without updating any files in the workspace generates exactly
|
||||
# the same output.)
|
||||
if kwargs:
|
||||
raise ValueError('Cannot call update() with kwargs')
|
||||
if other:
|
||||
if not isinstance(other[0], OrderedDict):
|
||||
raise ValueError(
|
||||
'Can only call update() with another OrderedDict')
|
||||
return super(InitializedDefines, self).update(*other, **kwargs)
|
||||
raise ValueError('No arguments passed to update()')
|
||||
|
||||
|
||||
class BaseCompileFlags(ContextDerivedValue, dict):
|
||||
def __init__(self, context):
|
||||
|
@ -1492,7 +1474,14 @@ VARIABLES = {
|
|||
|
||||
This will result in the compiler flags ``-DNS_NO_XPCOM``,
|
||||
``-DMOZ_EXTENSIONS_DB_SCHEMA=15``, and ``-DDLL_SUFFIX='".so"'``,
|
||||
respectively.
|
||||
respectively. These could also be combined into a single
|
||||
update::
|
||||
|
||||
DEFINES.update({
|
||||
'NS_NO_XPCOM': True,
|
||||
'MOZ_EXTENSIONS_DB_SCHEMA': 15,
|
||||
'DLL_SUFFIX': '".so"',
|
||||
})
|
||||
"""
|
||||
),
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ class ComputedFlags(ContextDerived):
|
|||
if value:
|
||||
for dest_var in dest_vars:
|
||||
flags[dest_var].extend(value)
|
||||
return sorted(flags.items())
|
||||
return flags.items()
|
||||
|
||||
|
||||
class XPIDLModule(ContextDerived):
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
value = 'xyz'
|
||||
DEFINES['FOO'] = True
|
||||
DEFINES = {
|
||||
'FOO': True,
|
||||
}
|
||||
|
||||
DEFINES['BAZ'] = '"ab\'cd"'
|
||||
DEFINES['QUX'] = False
|
||||
DEFINES['BAR'] = 7
|
||||
|
|
|
@ -2,8 +2,13 @@
|
|||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
value = 'xyz'
|
||||
HOST_DEFINES['FOO'] = True
|
||||
HOST_DEFINES = {
|
||||
'FOO': True,
|
||||
}
|
||||
|
||||
HOST_DEFINES['BAZ'] = '"ab\'cd"'
|
||||
HOST_DEFINES['BAR'] = 7
|
||||
HOST_DEFINES['VALUE'] = value
|
||||
HOST_DEFINES['QUX'] = False
|
||||
HOST_DEFINES.update({
|
||||
'BAR': 7,
|
||||
'VALUE': value,
|
||||
'QUX': False,
|
||||
})
|
||||
|
|
|
@ -931,7 +931,7 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||
root_deps_path = mozpath.join(env.topobjdir, 'root-deps.mk')
|
||||
lines = [l.strip() for l in open(root_deps_path, 'rt').readlines()]
|
||||
|
||||
self.assertTrue(any(l == 'recurse_compile: code/host code/target' for l in lines))
|
||||
self.assertTrue(any(l == 'recurse_compile: code/target code/host' for l in lines))
|
||||
|
||||
def test_final_target(self):
|
||||
"""Test that FINAL_TARGET is written to backend.mk correctly."""
|
||||
|
|
|
@ -2,8 +2,13 @@
|
|||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
value = 'xyz'
|
||||
DEFINES['FOO'] = True
|
||||
DEFINES = {
|
||||
'FOO': True,
|
||||
}
|
||||
|
||||
DEFINES['BAZ'] = '"abcd"'
|
||||
DEFINES['BAR'] = 7
|
||||
DEFINES['VALUE'] = value
|
||||
DEFINES['QUX'] = False
|
||||
DEFINES.update({
|
||||
'BAR': 7,
|
||||
'VALUE': value,
|
||||
'QUX': False,
|
||||
})
|
||||
|
|
|
@ -11,10 +11,15 @@ HostLibrary('dummy')
|
|||
HOST_SOURCES += ['test1.c']
|
||||
|
||||
value = 'xyz'
|
||||
HOST_DEFINES['FOO'] = True
|
||||
HOST_DEFINES = {
|
||||
'FOO': True,
|
||||
}
|
||||
|
||||
HOST_DEFINES['BAZ'] = '"abcd"'
|
||||
HOST_DEFINES['BAR'] = 7
|
||||
HOST_DEFINES['VALUE'] = value
|
||||
HOST_DEFINES['QUX'] = False
|
||||
HOST_DEFINES.update({
|
||||
'BAR': 7,
|
||||
'VALUE': value,
|
||||
'QUX': False,
|
||||
})
|
||||
|
||||
HOST_CFLAGS += ['-funroll-loops', '-host-arg']
|
|
@ -6,9 +6,15 @@ SANDBOXED_WASM_LIBRARY_NAME = 'dummy'
|
|||
WASM_SOURCES += ['test1.c']
|
||||
|
||||
value = 'xyz'
|
||||
WASM_DEFINES['FOO'] = True
|
||||
WASM_DEFINES = {
|
||||
'FOO': True,
|
||||
}
|
||||
|
||||
WASM_DEFINES['BAZ'] = '"abcd"'
|
||||
WASM_DEFINES['BAR'] = 7
|
||||
WASM_DEFINES['VALUE'] = value
|
||||
WASM_DEFINES['QUX'] = False
|
||||
WASM_DEFINES.update({
|
||||
'BAR': 7,
|
||||
'VALUE': value,
|
||||
'QUX': False,
|
||||
})
|
||||
|
||||
WASM_CFLAGS += ['-funroll-loops', '-wasm-arg']
|
||||
|
|
|
@ -250,9 +250,16 @@ class FileAvoidWrite(BytesIO):
|
|||
underlying file was changed, ``.diff`` will be populated with the diff
|
||||
of the result.
|
||||
"""
|
||||
# Use binary data if the caller explicitly asked for it.
|
||||
ensure = six.ensure_binary if self._binary_mode else six.ensure_text
|
||||
buf = ensure(self.getvalue())
|
||||
if self._binary_mode or six.PY2:
|
||||
# Use binary data under Python 2 because it can be written to files
|
||||
# opened with either open(mode='w') or open(mode='wb') without raising
|
||||
# unicode errors. Also use binary data if the caller explicitly asked for
|
||||
# it.
|
||||
buf = self.getvalue()
|
||||
else:
|
||||
# Use strings in Python 3 unless the caller explicitly asked for binary
|
||||
# data.
|
||||
buf = self.getvalue().decode('utf-8')
|
||||
|
||||
BytesIO.close(self)
|
||||
existed = False
|
||||
|
|
Загрузка…
Ссылка в новой задаче