Browse Source

remove my outdated patch queue

Frank-Rainer Grahl 3 years ago
parent
commit
bc8e9de55a

+ 0 - 445
bug1240930-253/frg-mozilla/1240930-80a1.patch

@@ -1,445 +0,0 @@
-# HG changeset patch
-# User Mike Hommey <mh+mozilla@glandium.org>
-# Date 1593552872 0
-# Node ID 22a1bfea8f7b108e24ebfd6c2539bcd524f8326b
-# Parent  3e0248a432be89e7016e5ef81736d418f8cbc4f0
-Bug 1240930 - Move jar_maker to the misc tier. r=firefox-build-system-reviewers,geckoview-reviewers,rstewart,agi
-
-Because jar_maker is not in the libs tier, we also rename the libs-%
-targets for l10n repacks to l10n-%, which make it clearer what they are
-for.
-
-And because multilocale.txt is both a GeneratedFile and a file that is
-generated (and installed) via manual build rules, keeping it in the misc
-target actually breaks building in toolkit/locales during l10n repacks,
-so move it to libs for now.
-
-Differential Revision: https://phabricator.services.mozilla.com/D81766
-
-diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
---- a/browser/locales/Makefile.in
-+++ b/browser/locales/Makefile.in
-@@ -6,17 +6,17 @@
- include $(topsrcdir)/config/config.mk
- 
- 
- SUBMAKEFILES += \
- 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
- 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
- 	$(NULL)
- 
--# This makefile uses variable overrides from the libs-% target to
-+# This makefile uses variable overrides from the l10n-% target to
- # build non-default locales to non-default dist/ locations. Be aware!
- 
- PWD := $(CURDIR)
- 
- # These are defaulted to be compatible with the files the wget-en-US target
- # pulls. You may override them if you provide your own files.
- ZIP_IN ?= $(ABS_DIST)/$(PACKAGE)
- 
-@@ -46,34 +46,34 @@ endif
- # Required for l10n.mk - defines a list of app sub dirs that should
- # be included in langpack xpis.
- DIST_SUBDIRS = $(DIST_SUBDIR)
- 
- include $(topsrcdir)/config/rules.mk
- 
- include $(topsrcdir)/toolkit/locales/l10n.mk
- 
--libs-%: AB_CD=$*
--libs-%:
-+l10n-%: AB_CD=$*
-+l10n-%:
- 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
- 	$(NSINSTALL) -D $(DIST)/install
--	@$(MAKE) -C ../../toolkit/locales libs-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
-+	@$(MAKE) -C ../../toolkit/locales l10n-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
- 	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
- 	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
- ifneq (,$(wildcard ../extensions/formautofill/locales))
- 	@$(MAKE) -C ../extensions/formautofill/locales AB_CD=$* XPI_NAME=locale-$*
- endif
- 	@$(MAKE) -C ../extensions/jaws-esr/locales AB_CD=$* XPI_NAME=locale-$*
- 	@$(MAKE) -C ../extensions/pocket/locale AB_CD=$* XPI_NAME=locale-$*
- ifneq '$(or $(MOZ_DEV_EDITION),$(NIGHTLY_BUILD))' ''
- 	@$(MAKE) -C ../extensions/webcompat-reporter/locales AB_CD=$* XPI_NAME=locale-$*
- endif
- 	@$(MAKE) -C ../../devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
- 	@$(MAKE) -C ../../devtools/shim/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
--	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
-+	@$(MAKE) l10n AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
- 	@$(MAKE) multilocale.txt-$* AB_CD=$* XPI_NAME=locale-$*
- 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
- 
- chrome-%: AB_CD=$*
- chrome-%: IS_LANGUAGE_REPACK=1
- chrome-%:
- 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
- 	@$(MAKE) -C ../../toolkit/locales chrome-$*
-@@ -99,17 +99,17 @@ langpack: langpack-$(AB_CD)
- 
- # This is a generic target that will make a langpack, repack ZIP (+tarball)
- # builds, and repack an installer if applicable. It is called from the
- # tinderbox scripts. Alter it with caution.
- 
- installers-%: IS_LANGUAGE_REPACK=1
- installers-%:
- 	@$(MAKE) clobber-$*
--	@$(MAKE) libs-$*
-+	@$(MAKE) l10n-$*
- 	@$(MAKE) package-langpack-$*
- 	@$(MAKE) repackage-zip-$*
- ifeq (WINNT,$(OS_ARCH))
- 	@$(MAKE) package-win32-installer AB_CD=$*
- endif
- 	@echo 'repackaging done'
- 
- ident:
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -1229,22 +1229,26 @@ endif
- # no way langpacks will get packaged right, so error out.
- ifneq (,$(DIST_SUBDIR))
- ifndef XPI_ROOT_APPID
- $(error XPI_ROOT_APPID is not defined - langpacks will break.)
- endif
- endif
- endif
- 
--libs realchrome:: $(FINAL_TARGET)/chrome
-+misc realchrome:: $(FINAL_TARGET)/chrome
- 	$(call py_action,jar_maker,\
- 	  $(QUIET) -d $(FINAL_TARGET) \
- 	  $(MAKE_JARS_FLAGS) $(DEFINES) $(ACDEFINES) \
- 	  $(JAR_MANIFEST))
- 
-+ifdef AB_CD
-+.PHONY: l10n
-+l10n: misc ;
-+endif
- endif
- 
- endif
- 
- # When you move this out of the tools tier, please remove the corresponding
- # hacks in recursivemake.py that check if Makefile.in sets the variable.
- ifneq ($(XPI_PKGNAME),)
- tools realchrome::
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -513,18 +513,16 @@ class RecursiveMakeBackend(CommonBackend
-         elif isinstance(obj, HostDefines):
-             self._process_defines(obj, backend_file, which='HOST_DEFINES')
-         elif isinstance(obj, Defines):
-             self._process_defines(obj, backend_file)
- 
-         elif isinstance(obj, GeneratedFile):
-             if obj.required_for_compile:
-                 tier = 'export'
--            elif obj.localized:
--                tier = 'libs'
-             else:
-                 tier = 'misc'
-             self._no_skip[tier].add(backend_file.relobjdir)
- 
-             # Localized generated files can use {AB_CD} and {AB_rCD} in their
-             # output paths.
-             if obj.localized:
-                 substs = {'AB_CD': '$(AB_CD)', 'AB_rCD': '$(AB_rCD)'}
-@@ -609,17 +607,17 @@ class RecursiveMakeBackend(CommonBackend
-            # with a different locale as input. IS_LANGUAGE_REPACK will reliably be set
-            # in this situation, so simply force the generation to run in that case.
-            force=force,
-            locale='--locale=$(AB_CD) ' if obj.localized else '',
-            script=obj.script,
-            method=obj.method))
- 
-         elif isinstance(obj, JARManifest):
--            self._no_skip['libs'].add(backend_file.relobjdir)
-+            self._no_skip['misc'].add(backend_file.relobjdir)
-             backend_file.write('JAR_MANIFEST := %s\n' % obj.path.full_path)
- 
-         elif isinstance(obj, RustProgram):
-             self._process_rust_program(obj, backend_file)
-             # Hook the program into the compile graph.
-             build_target = self._build_target_for_obj(obj)
-             self._compile_graph[build_target]
- 
-@@ -1487,16 +1485,19 @@ class RecursiveMakeBackend(CommonBackend
-                     else:
-                         install_manifest.add_link(f.full_path, dest)
-                 else:
-                     install_manifest.add_optional_exists(dest)
-                     objdir_files.append(self._pretty_path(f, backend_file))
-             install_location = '$(DEPTH)/%s' % mozpath.join(target, path)
-             if objdir_files:
-                 tier = 'export' if obj.install_target == 'dist/include' else 'misc'
-+                # We cannot generate multilocale.txt during misc at the moment.
-+                if objdir_files[0] == 'multilocale.txt':
-+                    tier = 'libs'
-                 self._add_install_target(backend_file, target_var, tier,
-                                          install_location, objdir_files)
-             if absolute_files:
-                 # Unfortunately, we can't use _add_install_target because on
-                 # Windows, the absolute file paths that we want to install
-                 # from often have spaces.  So we write our own rule.
-                 self._no_skip['misc'].add(backend_file.relobjdir)
-                 backend_file.write('misc::\n%s\n' %
-@@ -1545,37 +1546,37 @@ class RecursiveMakeBackend(CommonBackend
- 
-     def _process_localized_files(self, obj, files, backend_file):
-         target = obj.install_target
-         path = mozpath.basedir(target, ('dist/bin', ))
-         if not path:
-             raise Exception('Cannot install localized files to ' + target)
-         for i, (path, files) in enumerate(files.walk()):
-             name = 'LOCALIZED_FILES_%d' % i
--            self._no_skip['libs'].add(backend_file.relobjdir)
-+            self._no_skip['misc'].add(backend_file.relobjdir)
-             self._write_localized_files_files(files, name + '_FILES', backend_file)
-             # Use FINAL_TARGET here because some l10n repack rules set
-             # XPI_NAME to generate langpacks.
-             backend_file.write('%s_DEST = $(FINAL_TARGET)/%s\n' % (name, path))
--            backend_file.write('%s_TARGET := libs\n' % name)
-+            backend_file.write('%s_TARGET := misc\n' % name)
-             backend_file.write('INSTALL_TARGETS += %s\n' % name)
- 
-     def _process_localized_pp_files(self, obj, files, backend_file):
-         target = obj.install_target
-         path = mozpath.basedir(target, ('dist/bin', ))
-         if not path:
-             raise Exception('Cannot install localized files to ' + target)
-         for i, (path, files) in enumerate(files.walk()):
-             name = 'LOCALIZED_PP_FILES_%d' % i
--            self._no_skip['libs'].add(backend_file.relobjdir)
-+            self._no_skip['misc'].add(backend_file.relobjdir)
-             self._write_localized_files_files(files, name, backend_file)
-             # Use FINAL_TARGET here because some l10n repack rules set
-             # XPI_NAME to generate langpacks.
-             backend_file.write('%s_PATH = $(FINAL_TARGET)/%s\n' % (name, path))
--            backend_file.write('%s_TARGET := libs\n' % name)
-+            backend_file.write('%s_TARGET := misc\n' % name)
-             # Localized files will have different content in different
-             # localizations, and some preprocessed files may not have
-             # any preprocessor directives.
-             backend_file.write('%s_FLAGS := --silence-missing-directive-warnings\n' % name)
-             backend_file.write('PP_TARGETS += %s\n' % name)
- 
-     def _process_objdir_files(self, obj, files, backend_file):
-         # We can't use an install manifest for the root of the objdir, since it
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-@@ -457,54 +457,54 @@ class TestRecursiveMakeBackend(BackendTe
-     def test_localized_generated_files(self):
-         """Ensure LOCALIZED_GENERATED_FILES is handled properly."""
-         env = self._consume('localized-generated-files', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
--            'libs:: $(MDDEPDIR)/foo.xyz.stub',
-+            'misc:: $(MDDEPDIR)/foo.xyz.stub',
-             'foo.xyz: $(MDDEPDIR)/foo.xyz.stub ;',
-             'GARBAGE += foo.xyz',
-             'GARBAGE += $(MDDEPDIR)/foo.xyz.stub',
-             'EXTRA_MDDEPEND_FILES += foo.xyz.pp',
-             '$(MDDEPDIR)/foo.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-             '$(REPORT_BUILD)',
-             '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-             '@$(TOUCH) $@',
-             '',
-             'LOCALIZED_FILES_0_FILES += foo.xyz',
-             'LOCALIZED_FILES_0_DEST = $(FINAL_TARGET)/',
--            'LOCALIZED_FILES_0_TARGET := libs',
-+            'LOCALIZED_FILES_0_TARGET := misc',
-             'INSTALL_TARGETS += LOCALIZED_FILES_0',
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-     def test_localized_generated_files_force(self):
-         """Ensure LOCALIZED_GENERATED_FILES with .force is handled properly."""
-         env = self._consume('localized-generated-files-force', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
--            'libs:: $(MDDEPDIR)/foo.xyz.stub',
-+            'misc:: $(MDDEPDIR)/foo.xyz.stub',
-             'foo.xyz: $(MDDEPDIR)/foo.xyz.stub ;',
-             'GARBAGE += foo.xyz',
-             'GARBAGE += $(MDDEPDIR)/foo.xyz.stub',
-             'EXTRA_MDDEPEND_FILES += foo.xyz.pp',
-             '$(MDDEPDIR)/foo.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-             '$(REPORT_BUILD)',
-             '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-             '@$(TOUCH) $@',
-             '',
--            'libs:: $(MDDEPDIR)/abc.xyz.stub',
-+            'misc:: $(MDDEPDIR)/abc.xyz.stub',
-             'abc.xyz: $(MDDEPDIR)/abc.xyz.stub ;',
-             'GARBAGE += abc.xyz',
-             'GARBAGE += $(MDDEPDIR)/abc.xyz.stub',
-             'EXTRA_MDDEPEND_FILES += abc.xyz.pp',
-             '$(MDDEPDIR)/abc.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input FORCE' % env.topsrcdir,
-             '$(REPORT_BUILD)',
-             '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(MDDEPDIR)/abc.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-             '@$(TOUCH) $@',
-@@ -518,17 +518,17 @@ class TestRecursiveMakeBackend(BackendTe
-         """Ensure LOCALIZED_GENERATED_FILES is handled properly
-         when {AB_CD} and {AB_rCD} are used."""
-         env = self._consume('localized-generated-files-AB_CD', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
--            'libs:: $(MDDEPDIR)/foo$(AB_CD).xyz.stub',
-+            'misc:: $(MDDEPDIR)/foo$(AB_CD).xyz.stub',
-             'foo$(AB_CD).xyz: $(MDDEPDIR)/foo$(AB_CD).xyz.stub ;',
-             'GARBAGE += foo$(AB_CD).xyz',
-             'GARBAGE += $(MDDEPDIR)/foo$(AB_CD).xyz.stub',
-             'EXTRA_MDDEPEND_FILES += foo$(AB_CD).xyz.pp',
-             '$(MDDEPDIR)/foo$(AB_CD).xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-             '$(REPORT_BUILD)',
-             '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo$(AB_CD).xyz $(MDDEPDIR)/foo$(AB_CD).xyz.pp $(MDDEPDIR)/foo$(AB_CD).xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-             '@$(TOUCH) $@',
-@@ -972,17 +972,17 @@ class TestRecursiveMakeBackend(BackendTe
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
-             'LOCALIZED_FILES_0_FILES += $(wildcard $(LOCALE_SRCDIR)/abc/*.abc)',
-             'LOCALIZED_FILES_0_FILES += $(call MERGE_FILE,bar.ini)',
-             'LOCALIZED_FILES_0_FILES += $(call MERGE_FILE,foo.js)',
-             'LOCALIZED_FILES_0_DEST = $(FINAL_TARGET)/',
--            'LOCALIZED_FILES_0_TARGET := libs',
-+            'LOCALIZED_FILES_0_TARGET := misc',
-             'INSTALL_TARGETS += LOCALIZED_FILES_0',
-         ]
- 
-         found = [str for str in lines if 'LOCALIZED_FILES' in str]
-         self.assertEqual(found, expected)
- 
-     def test_localized_pp_files(self):
-         """Test that LOCALIZED_PP_FILES is written to backend.mk correctly."""
-@@ -990,17 +990,17 @@ class TestRecursiveMakeBackend(BackendTe
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
-             'LOCALIZED_PP_FILES_0 += $(call MERGE_FILE,bar.ini)',
-             'LOCALIZED_PP_FILES_0 += $(call MERGE_FILE,foo.js)',
-             'LOCALIZED_PP_FILES_0_PATH = $(FINAL_TARGET)/',
--            'LOCALIZED_PP_FILES_0_TARGET := libs',
-+            'LOCALIZED_PP_FILES_0_TARGET := misc',
-             'LOCALIZED_PP_FILES_0_FLAGS := --silence-missing-directive-warnings',
-             'PP_TARGETS += LOCALIZED_PP_FILES_0',
-         ]
- 
-         found = [str for str in lines if 'LOCALIZED_PP_FILES' in str]
-         self.assertEqual(found, expected)
- 
-     def test_config(self):
-diff --git a/toolkit/locales/Makefile.in b/toolkit/locales/Makefile.in
---- a/toolkit/locales/Makefile.in
-+++ b/toolkit/locales/Makefile.in
-@@ -1,21 +1,21 @@
- # 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/.
- 
- include $(topsrcdir)/config/rules.mk
- 
--libs-%: AB_CD=$*
--libs-%:
--	@$(MAKE) -C ../../netwerk/locales/ libs AB_CD=$* XPI_NAME=locale-$*
--	@$(MAKE) -C ../../dom/locales/ libs AB_CD=$* XPI_NAME=locale-$*
--	@$(MAKE) -C ../../security/manager/locales/ libs AB_CD=$* XPI_NAME=locale-$*
--	@$(MAKE) -C ../../devtools/shared/locales/ libs AB_CD=$* XPI_NAME=locale-$*
--	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$*
-+l10n-%: AB_CD=$*
-+l10n-%:
-+	@$(MAKE) -C ../../netwerk/locales/ l10n AB_CD=$* XPI_NAME=locale-$*
-+	@$(MAKE) -C ../../dom/locales/ l10n AB_CD=$* XPI_NAME=locale-$*
-+	@$(MAKE) -C ../../security/manager/locales/ l10n AB_CD=$* XPI_NAME=locale-$*
-+	@$(MAKE) -C ../../devtools/shared/locales/ l10n AB_CD=$* XPI_NAME=locale-$*
-+	@$(MAKE) l10n AB_CD=$* XPI_NAME=locale-$*
- 
- # target to be used by multi-locale l10n builds, just add this locale
- # like regular chrome code
- chrome-%: AB_CD=$*
- chrome-%:
- 	@$(MAKE) -C $(DEPTH)/netwerk/locales/ chrome AB_CD=$*
- 	@$(MAKE) -C $(DEPTH)/dom/locales/ chrome AB_CD=$*
- 	@$(MAKE) -C $(DEPTH)/security/manager/locales/ chrome AB_CD=$*
-diff --git a/toolkit/locales/l10n.mk b/toolkit/locales/l10n.mk
---- a/toolkit/locales/l10n.mk
-+++ b/toolkit/locales/l10n.mk
-@@ -3,18 +3,18 @@
- # 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/.
- 
- 
- # Shared makefile that can be used to easily kick off l10n builds
- # of Mozilla applications.
- # This makefile should be included, and then assumes that the including
- # makefile defines the following targets:
--# libs-%
--#   This target should call into the various libs targets that this
-+# l10n-%
-+#   This target should call into the various l10n targets that this
- #   application depends on.
- # installer-%
- #   This target should list all required targets, a typical rule would be
- #	installers-%: clobber-% langpack-% repackage-zip-%
- #		@echo "repackaging done"
- #   to initially clobber the locale staging area, and then to build the
- #   language pack and zip package.
- #   Other targets like windows installers might be listed, too, and should
-@@ -22,17 +22,17 @@
- #   The installer-% targets should not set AB_CD, so that the unpackaging
- #   step finds the original package.
- # The including makefile should provide values for the variables
- #   MOZ_APP_VERSION and MOZ_LANGPACK_EID.
- 
- 
- run_for_effects := $(shell if test ! -d $(DIST); then $(NSINSTALL) -D $(DIST); fi)
- 
--# This makefile uses variable overrides from the libs-% target to
-+# This makefile uses variable overrides from the l10n-% target to
- # build non-default locales to non-default dist/ locations. Be aware!
- 
- LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD)))
- ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
- ifeq (zh-TW,$(AB_CD))
- LPROJ_ROOT := $(subst -,_,$(AB_CD))
- endif
- endif
-@@ -199,17 +199,17 @@ endif
- 	$(RM) -rf $(REAL_LOCALE_MERGEDIR)
- 	-$(MOZILLA_DIR)/mach compare-locales $(COMPARE_LOCALES_DEFINES) --merge $(BASE_MERGE) $(srcdir)/l10n.toml $(L10NBASEDIR) $*
- 
- langpack-%: IS_LANGUAGE_REPACK=1
- langpack-%: IS_LANGPACK=1
- langpack-%: AB_CD=$*
- langpack-%:
- 	@echo 'Making langpack $(LANGPACK_FILE)'
--	@$(MAKE) libs-$(AB_CD)
-+	@$(MAKE) l10n-$(AB_CD)
- 	@$(MAKE) package-langpack-$(AB_CD)
- 
- # language pack checking is done against the toolkit version.
- ifeq (,$(MOZ_SUITE))
- MOZ_MIN_APP_VERSION = $(MOZ_APP_VERSION)
- MOZ_MAX_APP_VERSION = $(MOZ_APP_MAXVERSION)
- else
- MOZ_MIN_APP_VERSION = $(MOZILLA_VERSION)

+ 0 - 82
bug1240930-253/frg-mozilla/1429875-1-61a1.patch

@@ -1,82 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1521588665 25200
-# Node ID 36f505b0e0da72cbcd109ec7eeb2fb449f6da927
-# Parent  937134da9b8fb5c6f696a243293eba4a7196cb10
-Bug 1429875 - Add a "name" property to Library and Program objects that corresponds to the output basename. r=glandium
-
-MozReview-Commit-ID: J4gt1fGUzOa
-
-diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py
---- a/python/mozbuild/mozbuild/frontend/data.py
-+++ b/python/mozbuild/mozbuild/frontend/data.py
-@@ -482,16 +482,19 @@ class BaseProgram(Linkable):
-         if self.installed:
-             return ObjDirPath(self._context, '!/' + mozpath.join(self.install_target, self.program))
-         else:
-             return ObjDirPath(self._context, '!' + self.program)
- 
-     def __repr__(self):
-         return '<%s: %s/%s>' % (type(self).__name__, self.relobjdir, self.program)
- 
-+    @property
-+    def name(self):
-+        return self.program
- 
- class Program(BaseProgram):
-     """Context derived container object for PROGRAM"""
-     SUFFIX_VAR = 'BIN_SUFFIX'
-     KIND = 'target'
- 
- 
- class HostProgram(HostMixin, BaseProgram):
-@@ -596,16 +599,20 @@ class BaseLibrary(Linkable):
-             )
-             self.import_name = self.lib_name
- 
-         self.refs = []
- 
-     def __repr__(self):
-         return '<%s: %s/%s>' % (type(self).__name__, self.relobjdir, self.lib_name)
- 
-+    @property
-+    def name(self):
-+        return self.lib_name
-+
- 
- class Library(BaseLibrary):
-     """Context derived container object for a library"""
-     KIND = 'target'
-     __slots__ = (
-     )
- 
-     def __init__(self, context, basename, real_name=None):
-diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
---- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
-+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
-@@ -1161,19 +1161,25 @@ class TestEmitterBasic(unittest.TestCase
- 
-     def test_linkables_cxx_link(self):
-         """Test that linkables transitively set cxx_link properly."""
-         reader = self.reader('test-linkables-cxx-link')
-         got_results = 0
-         for obj in self.read_topsrcdir(reader):
-             if isinstance(obj, SharedLibrary):
-                 if obj.basename == 'cxx_shared':
-+                    self.assertEquals(obj.name, '%scxx_shared%s' %
-+                                      (reader.config.dll_prefix,
-+                                       reader.config.dll_suffix))
-                     self.assertTrue(obj.cxx_link)
-                     got_results += 1
-                 elif obj.basename == 'just_c_shared':
-+                    self.assertEquals(obj.name, '%sjust_c_shared%s' %
-+                                      (reader.config.dll_prefix,
-+                                       reader.config.dll_suffix))
-                     self.assertFalse(obj.cxx_link)
-                     got_results += 1
-         self.assertEqual(got_results, 2)
- 
-     def test_generated_sources(self):
-         """Test that GENERATED_SOURCES works properly."""
-         reader = self.reader('generated-sources')
-         objs = self.read_topsrcdir(reader)

+ 0 - 54
bug1240930-253/frg-mozilla/1429875-2-61a1.patch

@@ -1,54 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1521588665 25200
-# Node ID 4cdc60a9f06ee184973d888f7013a4ab30fe4e99
-# Parent  7f14895e2fca740e8d135619564e562014844c83
-Bug 1429875 - Do not take DIST_INSTALL into account when deciding to build static libraries. r=glandium
-
-Now that we're no longer shipping the SDK we no longer need real libraries for
-the libraries that were created by this rule.
-
-MozReview-Commit-ID: ALATVGBayHu
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -95,38 +95,23 @@ endif # ENABLE_TESTS
- # Library rules
- #
- # If FORCE_STATIC_LIB is set, build a static library.
- # Otherwise, build a shared library.
- #
- 
- ifndef LIBRARY
- ifdef REAL_LIBRARY
--# Don't build actual static library if a shared library is also built
--ifdef FORCE_SHARED_LIB
--# ... except when we really want one
- ifdef NO_EXPAND_LIBS
- LIBRARY			:= $(REAL_LIBRARY)
- else
- LIBRARY			:= $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
- endif
--else
--# Only build actual library if it is installed in DIST/lib
--ifeq (,$(DIST_INSTALL)$(NO_EXPAND_LIBS))
--LIBRARY			:= $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
--else
--ifdef NO_EXPAND_LIBS
--LIBRARY			:= $(REAL_LIBRARY)
--else
--LIBRARY			:= $(REAL_LIBRARY) $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
- endif
- endif
--endif
--endif # REAL_LIBRARY
--endif # LIBRARY
- 
- ifndef HOST_LIBRARY
- ifdef HOST_LIBRARY_NAME
- HOST_LIBRARY		:= $(LIB_PREFIX)$(HOST_LIBRARY_NAME).$(LIB_SUFFIX)
- endif
- endif
- 
- ifdef FORCE_SHARED_LIB

+ 0 - 287
bug1240930-253/frg-mozilla/1429875-3-61a1.patch

@@ -1,287 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1521588665 25200
-# Node ID decbe4a4cdc77b610f7b9bae8622dbfcd00f2694
-# Parent  989c246b8606907c1e4218db7c254820c8d13fc7
-Bug 1429875 - Add a unit test for linkage variables in the make backend. r=glandium
-
-MozReview-Commit-ID: HREobMhWTwg
-
-diff --git a/python/mozbuild/mozbuild/test/backend/common.py b/python/mozbuild/mozbuild/test/backend/common.py
---- a/python/mozbuild/mozbuild/test/backend/common.py
-+++ b/python/mozbuild/mozbuild/test/backend/common.py
-@@ -191,16 +191,27 @@ CONFIGS = defaultdict(lambda: {
-     'program-paths': {
-         'defines': {},
-         'non_global_defines': [],
-         'substs': {
-             'COMPILE_ENVIRONMENT': '1',
-             'BIN_SUFFIX': '.prog',
-         },
-     },
-+    'linkage': {
-+        'defines': {},
-+        'non_global_defines': [],
-+        'substs': {
-+            'COMPILE_ENVIRONMENT': '1',
-+            'LIB_SUFFIX': 'a',
-+            'BIN_SUFFIX': '.exe',
-+            'DLL_SUFFIX': '.so',
-+            'OBJ_SUFFIX': 'o',
-+        },
-+    },
- })
- 
- 
- class BackendTester(unittest.TestCase):
-     def setUp(self):
-         self._old_env = dict(os.environ)
-         os.environ.pop('MOZ_OBJDIR', None)
- 
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/moz.build
-@@ -0,0 +1,11 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+include('templates.mozbuild')
-+
-+DIRS += [
-+     'real',
-+     'shared',
-+     'prog',
-+     'static',
-+]
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/prog/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/prog/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/prog/moz.build
-@@ -0,0 +1,11 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+DIRS += ['qux']
-+
-+Program('MyProgram')
-+
-+USE_LIBS += [
-+    'bar',
-+    'baz',
-+]
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/prog/qux/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/prog/qux/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/prog/qux/moz.build
-@@ -0,0 +1,6 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+SOURCES += ['qux1.c']
-+
-+SharedLibrary('qux')
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/prog/qux/qux1.c b/python/mozbuild/mozbuild/test/backend/data/linkage/prog/qux/qux1.c
-new file mode 100644
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/foo1.c b/python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/foo1.c
-new file mode 100644
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/foo2.c b/python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/foo2.c
-new file mode 100644
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/moz.build
-@@ -0,0 +1,9 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+SOURCES += [
-+    'foo1.c',
-+    'foo2.c'
-+]
-+
-+FINAL_LIBRARY = 'foo'
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/real/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/real/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/real/moz.build
-@@ -0,0 +1,14 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+DIRS += [
-+    'foo',
-+]
-+
-+NO_EXPAND_LIBS = True
-+
-+OS_LIBS += ['-lbaz']
-+
-+USE_LIBS += ['static:baz']
-+
-+Library('foo')
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/shared/baz/baz1.c b/python/mozbuild/mozbuild/test/backend/data/linkage/shared/baz/baz1.c
-new file mode 100644
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/shared/baz/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/shared/baz/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/shared/baz/moz.build
-@@ -0,0 +1,6 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+SOURCES += ['baz1.c']
-+
-+FINAL_LIBRARY = 'baz'
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/shared/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/shared/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/shared/moz.build
-@@ -0,0 +1,14 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+DIRS += [
-+    'baz',
-+]
-+
-+STATIC_LIBRARY_NAME = 'baz_s'
-+FORCE_STATIC_LIB = True
-+
-+OS_LIBS += ['-lfoo']
-+USE_LIBS += ['qux']
-+
-+SharedLibrary('baz')
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar1.cc b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar1.cc
-new file mode 100644
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.build
-@@ -0,0 +1,8 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+SOURCES += [
-+    'bar1.cc',
-+]
-+
-+FINAL_LIBRARY = 'bar'
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/static/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/static/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/static/moz.build
-@@ -0,0 +1,12 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+DIRS += [
-+    'bar',
-+]
-+
-+USE_LIBS += ['foo']
-+
-+OS_LIBS += ['-lbar']
-+
-+Library('bar')
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/templates.mozbuild b/python/mozbuild/mozbuild/test/backend/data/linkage/templates.mozbuild
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/templates.mozbuild
-@@ -0,0 +1,23 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+@template
-+def Library(name):
-+    LIBRARY_NAME = name
-+
-+@template
-+def SharedLibrary(name):
-+    FORCE_SHARED_LIB = True
-+    LIBRARY_NAME = name
-+
-+@template
-+def Binary():
-+    # Add -lfoo for testing purposes.
-+    OS_LIBS += ['foo']
-+
-+
-+@template
-+def Program(name):
-+    PROGRAM = name
-+
-+    Binary()
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-@@ -982,16 +982,61 @@ class TestRecursiveMakeBackend(BackendTe
- 
-         with open(os.path.join(env.topobjdir, 'cxx-library', 'backend.mk'), 'rb') as fh:
-             lines = fh.readlines()
-             lines = [line.rstrip() for line in lines]
- 
-             for line in lines:
-                 self.assertNotIn('LIB_IS_C_ONLY', line)
- 
-+    def test_linkage(self):
-+        env = self._consume('linkage', RecursiveMakeBackend)
-+        expected_linkage = {
-+            'prog': {
-+                'SHARED_LIBS': ['$(DEPTH)/shared/baz', '$(DEPTH)/prog/qux/qux'],
-+                'STATIC_LIBS': ['$(DEPTH)/static/bar%s' % env.lib_suffix],
-+                'OS_LIBS': ['-lfoo', '-lbaz', '-lbar'],
-+            },
-+            'shared': {
-+                'OS_LIBS': ['-lfoo'],
-+                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux'],
-+                'STATIC_LIBS': ['$(DEPTH)/shared/baz/shared_baz%s' %
-+                                env.lib_suffix],
-+            },
-+            'static': {
-+                'STATIC_LIBS': [
-+                    '$(DEPTH)/static/bar/static_bar.a',
-+                    '$(DEPTH)/real/foo.a',
-+                ],
-+                'OS_LIBS': ['-lbar'],
-+                'SHARED_LIBS': [],
-+            },
-+            'real': {
-+                'STATIC_LIBS': [
-+                    '$(DEPTH)/shared/baz_s%s' % env.lib_suffix,
-+                    '$(DEPTH)/real/foo/real_foo%s' % env.lib_suffix,
-+                ],
-+                'SHARED_LIBS': [],
-+                'OS_LIBS': ['-lbaz'],
-+            }
-+        }
-+        actual_linkage = {}
-+        for name in expected_linkage.keys():
-+            with open(os.path.join(env.topobjdir, name, 'backend.mk'), 'rb') as fh:
-+                actual_linkage[name] = [line.rstrip() for line in fh.readlines()]
-+        for name in expected_linkage:
-+            for var in expected_linkage[name]:
-+                for val in expected_linkage[name][var]:
-+                    line = '%s += %s' % (var, val)
-+                    self.assertIn(line,
-+                                  actual_linkage[name])
-+                    actual_linkage[name].remove(line)
-+                for line in actual_linkage[name]:
-+                    self.assertNotIn('%s +=' % var, line)
-+
-     def test_jar_manifests(self):
-         env = self._consume('jar-manifests', RecursiveMakeBackend)
- 
-         with open(os.path.join(env.topobjdir, 'backend.mk'), 'rb') as fh:
-             lines = fh.readlines()
- 
-         lines = [line.rstrip() for line in lines]
- 

+ 0 - 1775
bug1240930-253/frg-mozilla/1429875-4-61a1.patch

@@ -1,1775 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1521588665 25200
-# Node ID 7547d66e0f518d20f61b492eac027d5a34ac6fb4
-# Parent  a798776b7132104fc4c93b59741ebf5054bd930c
-Bug 1429875 - Remove expandlibs and instead generate list files in the mozbuild backend. r=glandium
-
-MozReview-Commit-ID: 5eLwnh1HHGj
-
-diff --git a/build/clang-plugin/Makefile.in b/build/clang-plugin/Makefile.in
---- a/build/clang-plugin/Makefile.in
-+++ b/build/clang-plugin/Makefile.in
-@@ -8,20 +8,16 @@ include $(topsrcdir)/config/config.mk
- # variable to limit ourselves to what we need to build the clang plugin.
- ifneq ($(HOST_OS_ARCH),WINNT)
- DSO_LDOPTS := -shared
- endif
- 
- ifeq ($(HOST_OS_ARCH)_$(OS_ARCH),Linux_Darwin)
- # Use the host compiler instead of the target compiler.
- CXX := $(HOST_CXX)
--# expandlibs doesn't know the distinction between host and target toolchains,
--# and on cross linux/darwin builds, the options to give to the linker for file
--# lists differ between both, so don't use file lists.
--EXPAND_MKSHLIB_ARGS :=
- endif
- 
- # Use the default OS X deployment target to enable using the libc++ headers
- # correctly.  Note that the binary produced here is a host tool and doesn't need
- # to be distributed.
- MACOSX_DEPLOYMENT_TARGET :=
- 
- # Temporarily relax the requirements for libstdc++ symbol versions on static
-diff --git a/config/config.mk b/config/config.mk
---- a/config/config.mk
-+++ b/config/config.mk
-@@ -421,28 +421,16 @@ JAVAC_FLAGS += -source 1.4
- 
- ifdef MOZ_DEBUG
- JAVAC_FLAGS += -g
- endif
- 
- # MDDEPDIR is the subdirectory where dependency files are stored
- MDDEPDIR := .deps
- 
--EXPAND_LIBS_EXEC = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_exec.py
--EXPAND_LIBS_GEN = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_gen.py
--EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
--EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
--EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
--EXPAND_LINK = $(EXPAND_LIBS_EXEC) --uselist -- $(LINKER)
--EXPAND_MKSHLIB_ARGS = --uselist
--ifdef SYMBOL_ORDER
--EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
--endif
--EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
--
- # autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
- # this file
- OBJ_SUFFIX := $(_OBJ_SUFFIX)
- 
- # PGO builds with GCC build objects with instrumentation in a first pass,
- # then objects optimized, without instrumentation, in a second pass. If
- # we overwrite the objects from the first pass with those from the second,
- # we end up not getting instrumentation data for better optimization on
-diff --git a/config/expandlibs.py b/config/expandlibs.py
-deleted file mode 100644
---- a/config/expandlibs.py
-+++ /dev/null
-@@ -1,143 +0,0 @@
--# 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/.
--
--'''Expandlibs is a system that allows to replace some libraries with a
--descriptor file containing some linking information about them.
--
--The descriptor file format is as follows:
-----8<-----
--OBJS = a.o b.o ...
--LIBS = libfoo.a libbar.a ...
----->8-----
--
--(In the example above, OBJ_SUFFIX is o and LIB_SUFFIX is a).
--
--Expandlibs also canonicalizes how to pass libraries to the linker, such
--that only the ${LIB_PREFIX}${ROOT}.${LIB_SUFFIX} form needs to be used:
--given a list of files, expandlibs will replace items with the form
--${LIB_PREFIX}${ROOT}.${LIB_SUFFIX} following these rules:
--
--- If a ${DLL_PREFIX}${ROOT}.${DLL_SUFFIX} or
--  ${DLL_PREFIX}${ROOT}.${IMPORT_LIB_SUFFIX} file exists, use that instead
--- If the ${LIB_PREFIX}${ROOT}.${LIB_SUFFIX} file exists, use it
--- If a ${LIB_PREFIX}${ROOT}.${LIB_SUFFIX}.${LIB_DESC_SUFFIX} file exists,
--  replace ${LIB_PREFIX}${ROOT}.${LIB_SUFFIX} with the OBJS and LIBS the
--  descriptor contains. And for each of these LIBS, also apply the same
--  rules.
--'''
--from __future__ import with_statement
--import sys, os, errno
--import expandlibs_config as conf
--
--def ensureParentDir(file):
--    '''Ensures the directory parent to the given file exists'''
--    dir = os.path.dirname(file)
--    if dir and not os.path.exists(dir):
--        try:
--            os.makedirs(dir)
--        except OSError, error:
--            if error.errno != errno.EEXIST:
--                raise
--
--def relativize(path):
--    '''Returns a path relative to the current working directory, if it is
--    shorter than the given path'''
--    def splitpath(path):
--        dir, file = os.path.split(path)
--        if os.path.splitdrive(dir)[1] == os.sep:
--            return [file]
--        return splitpath(dir) + [file]
--
--    if not os.path.exists(path):
--        return path
--    curdir = splitpath(os.path.abspath(os.curdir))
--    abspath = splitpath(os.path.abspath(path))
--    while curdir and abspath and curdir[0] == abspath[0]:
--        del curdir[0]
--        del abspath[0]
--    if not curdir and not abspath:
--        return '.'
--    relpath = os.path.join(*[os.pardir for i in curdir] + abspath)
--    if len(path) > len(relpath):
--        return relpath
--    return path
--
--def isObject(path):
--    '''Returns whether the given path points to an object file, that is,
--    ends with OBJ_SUFFIX or .i_o'''
--    return os.path.splitext(path)[1] in [conf.OBJ_SUFFIX, '.i_o']
--
--def isDynamicLib(path):
--    '''Returns whether the given path points to a dynamic library, that is,
--    ends with DLL_SUFFIX.'''
--    # On mac, the xul library is named XUL, instead of libxul.dylib. Assume any
--    # file by that name is a dynamic library.
--    return os.path.splitext(path)[1] == conf.DLL_SUFFIX or os.path.basename(path) == 'XUL'
--
--class LibDescriptor(dict):
--    KEYS = ['OBJS', 'LIBS']
--
--    def __init__(self, content=None):
--        '''Creates an instance of a lib descriptor, initialized with contents
--        from a list of strings when given. This is intended for use with
--        file.readlines()'''
--        if isinstance(content, list) and all([isinstance(item, str) for item in content]):
--            pass
--        elif content is not None:
--            raise TypeError("LibDescriptor() arg 1 must be None or a list of strings")
--        super(LibDescriptor, self).__init__()
--        for key in self.KEYS:
--            self[key] = []
--        if not content:
--            return
--        for key, value in [(s.strip() for s in item.split('=', 2)) for item in content if item.find('=') >= 0]:
--            if key in self.KEYS:
--                self[key] = value.split()
--
--    def __str__(self):
--        '''Serializes the lib descriptor'''
--        return '\n'.join('%s = %s' % (k, ' '.join(self[k])) for k in self.KEYS if len(self[k]))
--
--class ExpandArgs(list):
--    def __init__(self, args):
--        '''Creates a clone of the |args| list and performs file expansion on
--        each item it contains'''
--        super(ExpandArgs, self).__init__()
--        self._descs = set()
--        for arg in args:
--            self += self._expand(arg)
--
--    def _expand(self, arg):
--        '''Internal function doing the actual work'''
--        (root, ext) = os.path.splitext(arg)
--        if ext != conf.LIB_SUFFIX or not os.path.basename(root).startswith(conf.LIB_PREFIX):
--            return [relativize(arg)]
--        if conf.LIB_PREFIX:
--            dll = root.replace(conf.LIB_PREFIX, conf.DLL_PREFIX, 1) + conf.DLL_SUFFIX
--        else:
--            dll = root + conf.DLL_SUFFIX
--        if os.path.exists(dll):
--            if conf.IMPORT_LIB_SUFFIX:
--                return [relativize(root + conf.IMPORT_LIB_SUFFIX)]
--            else:
--                return [relativize(dll)]
--        return self._expand_desc(arg)
--
--    def _expand_desc(self, arg):
--        '''Internal function taking care of lib descriptor expansion only'''
--        desc = os.path.abspath(arg + conf.LIBS_DESC_SUFFIX)
--        if os.path.exists(desc):
--            if desc in self._descs:
--                return []
--            self._descs.add(desc)
--            with open(desc, 'r') as f:
--                desc = LibDescriptor(f.readlines())
--            objs = [relativize(o) for o in desc['OBJS']]
--            for lib in desc['LIBS']:
--                objs += self._expand(lib)
--            return objs
--        return [relativize(arg)]
--
--if __name__ == '__main__':
--    print " ".join(ExpandArgs(sys.argv[1:]))
-diff --git a/config/expandlibs_config.py b/config/expandlibs_config.py
-deleted file mode 100644
---- a/config/expandlibs_config.py
-+++ /dev/null
-@@ -1,29 +0,0 @@
--# 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/.
--
--from buildconfig import substs
--
--def normalize_suffix(suffix):
--    '''Returns a normalized suffix, i.e. ensures it starts with a dot and
--    doesn't starts or ends with whitespace characters'''
--    value = suffix.strip()
--    if len(value) and not value.startswith('.'):
--        value = '.' + value
--    return value
--
--# Variables from the build system
--AR = substs['AR']
--AR_EXTRACT = substs['AR_EXTRACT'].replace('$(AR)', AR)
--DLL_PREFIX = substs['DLL_PREFIX']
--LIB_PREFIX = substs['LIB_PREFIX']
--RUST_LIB_PREFIX = substs['RUST_LIB_PREFIX']
--OBJ_SUFFIX = normalize_suffix(substs['OBJ_SUFFIX'])
--LIB_SUFFIX = normalize_suffix(substs['LIB_SUFFIX'])
--RUST_LIB_SUFFIX = normalize_suffix(substs['RUST_LIB_SUFFIX'])
--DLL_SUFFIX = normalize_suffix(substs['DLL_SUFFIX'])
--IMPORT_LIB_SUFFIX = normalize_suffix(substs['IMPORT_LIB_SUFFIX'])
--LIBS_DESC_SUFFIX = normalize_suffix(substs['LIBS_DESC_SUFFIX'])
--EXPAND_LIBS_LIST_STYLE = substs['EXPAND_LIBS_LIST_STYLE']
--EXPAND_LIBS_ORDER_STYLE = substs['EXPAND_LIBS_ORDER_STYLE']
--LD_PRINT_ICF_SECTIONS = substs['LD_PRINT_ICF_SECTIONS']
-diff --git a/config/expandlibs_exec.py b/config/expandlibs_exec.py
-deleted file mode 100644
---- a/config/expandlibs_exec.py
-+++ /dev/null
-@@ -1,354 +0,0 @@
--# 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/.
--
--'''expandlibs-exec.py applies expandlibs rules, and some more (see below) to
--a given command line, and executes that command line with the expanded
--arguments.
--
--With the --extract argument (useful for e.g. $(AR)), it extracts object files
--from static libraries (or use those listed in library descriptors directly).
--
--With the --uselist argument (useful for e.g. $(CC)), it replaces all object
--files with a list file. This can be used to avoid limitations in the length
--of a command line. The kind of list file format used depends on the
--EXPAND_LIBS_LIST_STYLE variable: 'list' for MSVC style lists (@file.list)
--or 'linkerscript' for GNU ld linker scripts.
--See https://bugzilla.mozilla.org/show_bug.cgi?id=584474#c59 for more details.
--
--With the --symbol-order argument, followed by a file name, it will add the
--relevant linker options to change the order in which the linker puts the
--symbols appear in the resulting binary. Only works for ELF targets.
--'''
--from __future__ import with_statement
--import sys
--import os
--from expandlibs import (
--    ExpandArgs,
--    relativize,
--    isDynamicLib,
--    isObject,
--)
--import expandlibs_config as conf
--from optparse import OptionParser
--import subprocess
--import tempfile
--import shutil
--import subprocess
--import re
--from mozbuild.makeutil import Makefile
--
--# The are the insert points for a GNU ld linker script, assuming a more
--# or less "standard" default linker script. This is not a dict because
--# order is important.
--SECTION_INSERT_BEFORE = [
--  ('.text', '.fini'),
--  ('.rodata', '.rodata1'),
--  ('.data.rel.ro', '.dynamic'),
--  ('.data', '.data1'),
--]
--
--class ExpandArgsMore(ExpandArgs):
--    ''' Meant to be used as 'with ExpandArgsMore(args) as ...: '''
--    def __enter__(self):
--        self.tmp = []
--        return self
--        
--    def __exit__(self, type, value, tb):
--        '''Automatically remove temporary files'''
--        for tmp in self.tmp:
--            if os.path.isdir(tmp):
--                shutil.rmtree(tmp, True)
--            else:
--                os.remove(tmp)
--
--    def extract(self):
--        self[0:] = self._extract(self)
--
--    def _extract(self, args):
--        '''When a static library name is found, either extract its contents
--        in a temporary directory or use the information found in the
--        corresponding lib descriptor.
--        '''
--        ar_extract = conf.AR_EXTRACT.split()
--        newlist = []
--
--        def lookup(base, f):
--            for root, dirs, files in os.walk(base):
--                if f in files:
--                    return os.path.join(root, f)
--
--        for arg in args:
--            if os.path.splitext(arg)[1] == conf.LIB_SUFFIX:
--                if os.path.exists(arg + conf.LIBS_DESC_SUFFIX):
--                    newlist += self._extract(self._expand_desc(arg))
--                    continue
--                elif os.path.exists(arg) and (len(ar_extract) or conf.AR == 'lib'):
--                    tmp = tempfile.mkdtemp(dir=os.curdir)
--                    self.tmp.append(tmp)
--                    if conf.AR == 'lib':
--                        out = subprocess.check_output([conf.AR, '-NOLOGO', '-LIST', arg])
--                        files = out.splitlines()
--                        # If lib -list returns a list full of dlls, it's an
--                        # import lib.
--                        if all(isDynamicLib(f) for f in files):
--                            newlist += [arg]
--                            continue
--                        for f in files:
--                            subprocess.call([conf.AR, '-NOLOGO', '-EXTRACT:%s' % f, os.path.abspath(arg)], cwd=tmp)
--                    else:
--                        subprocess.call(ar_extract + [os.path.abspath(arg)], cwd=tmp)
--                    objs = []
--                    basedir = os.path.dirname(arg)
--                    for root, dirs, files in os.walk(tmp):
--                        for f in files:
--                            if isObject(f):
--                                # If the file extracted from the library also
--                                # exists in the directory containing the
--                                # library, or one of its subdirectories, use
--                                # that instead.
--                                maybe_obj = lookup(os.path.join(basedir, os.path.relpath(root, tmp)), f)
--                                if maybe_obj:
--                                    objs.append(relativize(maybe_obj))
--                                else:
--                                    objs.append(relativize(os.path.join(root, f)))
--                    newlist += sorted(objs)
--                    continue
--            newlist += [arg]
--        return newlist
--
--    def makelist(self):
--        '''Replaces object file names with a temporary list file, using a
--        list format depending on the EXPAND_LIBS_LIST_STYLE variable
--        '''
--        objs = [o for o in self if isObject(o)]
--        if not len(objs): return
--        fd, tmp = tempfile.mkstemp(suffix=".list",dir=os.curdir)
--        if conf.EXPAND_LIBS_LIST_STYLE == "linkerscript":
--            content = ['INPUT("%s")\n' % obj for obj in objs]
--            ref = tmp
--        elif conf.EXPAND_LIBS_LIST_STYLE == "filelist":
--            content = ["%s\n" % obj for obj in objs]
--            ref = "-Wl,-filelist," + tmp
--        elif conf.EXPAND_LIBS_LIST_STYLE == "list":
--            content = ["%s\n" % obj for obj in objs]
--            ref = "@" + tmp
--        else:
--            os.close(fd)
--            os.remove(tmp)
--            return
--        self.tmp.append(tmp)
--        f = os.fdopen(fd, "w")
--        f.writelines(content)
--        f.close()
--        idx = self.index(objs[0])
--        newlist = self[0:idx] + [ref] + [os.path.normpath(item) for item in self[idx:] if item not in objs]
--        self[0:] = newlist
--
--    def _getFoldedSections(self):
--        '''Returns a dict about folded sections.
--        When section A and B are folded into section C, the dict contains:
--        { 'A': 'C',
--          'B': 'C',
--          'C': ['A', 'B'] }'''
--        if not conf.LD_PRINT_ICF_SECTIONS:
--            return {}
--
--        proc = subprocess.Popen(self + [conf.LD_PRINT_ICF_SECTIONS], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
--        (stdout, stderr) = proc.communicate()
--        result = {}
--        # gold's --print-icf-sections output looks like the following:
--        # ld: ICF folding section '.section' in file 'file.o'into '.section' in file 'file.o'
--        # In terms of words, chances are this will change in the future,
--        # especially considering "into" is misplaced. Splitting on quotes
--        # seems safer.
--        for l in stderr.split('\n'):
--            quoted = l.split("'")
--            if len(quoted) > 5 and quoted[1] != quoted[5]:
--                result[quoted[1]] = [quoted[5]]
--                if quoted[5] in result:
--                    result[quoted[5]].append(quoted[1])
--                else:
--                    result[quoted[5]] = [quoted[1]]
--        return result
--
--    def _getOrderedSections(self, ordered_symbols):
--        '''Given an ordered list of symbols, returns the corresponding list
--        of sections following the order.'''
--        if not conf.EXPAND_LIBS_ORDER_STYLE in ['linkerscript', 'section-ordering-file']:
--            raise Exception('EXPAND_LIBS_ORDER_STYLE "%s" is not supported' % conf.EXPAND_LIBS_ORDER_STYLE)
--        finder = SectionFinder([arg for arg in self if isObject(arg) or os.path.splitext(arg)[1] == conf.LIB_SUFFIX])
--        folded = self._getFoldedSections()
--        sections = set()
--        ordered_sections = []
--        for symbol in ordered_symbols:
--            symbol_sections = finder.getSections(symbol)
--            all_symbol_sections = []
--            for section in symbol_sections:
--                if section in folded:
--                    if isinstance(folded[section], str):
--                        section = folded[section]
--                    all_symbol_sections.append(section)
--                    all_symbol_sections.extend(folded[section])
--                else:
--                    all_symbol_sections.append(section)
--            for section in all_symbol_sections:
--                if not section in sections:
--                    ordered_sections.append(section)
--                    sections.add(section)
--        return ordered_sections
--
--    def orderSymbols(self, order):
--        '''Given a file containing a list of symbols, adds the appropriate
--        argument to make the linker put the symbols in that order.'''
--        with open(order) as file:
--            sections = self._getOrderedSections([l.strip() for l in file.readlines() if l.strip()])
--        split_sections = {}
--        linked_sections = [s[0] for s in SECTION_INSERT_BEFORE]
--        for s in sections:
--            for linked_section in linked_sections:
--                if s.startswith(linked_section):
--                    if linked_section in split_sections:
--                        split_sections[linked_section].append(s)
--                    else:
--                        split_sections[linked_section] = [s]
--                    break
--        content = []
--        # Order is important
--        linked_sections = [s for s in linked_sections if s in split_sections]
--
--        if conf.EXPAND_LIBS_ORDER_STYLE == 'section-ordering-file':
--            option = '-Wl,--section-ordering-file,%s'
--            content = sections
--            for linked_section in linked_sections:
--                content.extend(split_sections[linked_section])
--                content.append('%s.*' % linked_section)
--                content.append(linked_section)
--
--        elif conf.EXPAND_LIBS_ORDER_STYLE == 'linkerscript':
--            option = '-Wl,-T,%s'
--            section_insert_before = dict(SECTION_INSERT_BEFORE)
--            for linked_section in linked_sections:
--                content.append('SECTIONS {')
--                content.append('  %s : {' % linked_section)
--                content.extend('    *(%s)' % s for s in split_sections[linked_section])
--                content.append('  }')
--                content.append('}')
--                content.append('INSERT BEFORE %s' % section_insert_before[linked_section])
--        else:
--            raise Exception('EXPAND_LIBS_ORDER_STYLE "%s" is not supported' % conf.EXPAND_LIBS_ORDER_STYLE)
--
--        fd, tmp = tempfile.mkstemp(dir=os.curdir)
--        f = os.fdopen(fd, "w")
--        f.write('\n'.join(content)+'\n')
--        f.close()
--        self.tmp.append(tmp)
--        self.append(option % tmp)
--
--class SectionFinder(object):
--    '''Instances of this class allow to map symbol names to sections in
--    object files.'''
--
--    def __init__(self, objs):
--        '''Creates an instance, given a list of object files.'''
--        if not conf.EXPAND_LIBS_ORDER_STYLE in ['linkerscript', 'section-ordering-file']:
--            raise Exception('EXPAND_LIBS_ORDER_STYLE "%s" is not supported' % conf.EXPAND_LIBS_ORDER_STYLE)
--        self.mapping = {}
--        for obj in objs:
--            if not isObject(obj) and os.path.splitext(obj)[1] != conf.LIB_SUFFIX:
--                raise Exception('%s is not an object nor a static library' % obj)
--            for symbol, section in SectionFinder._getSymbols(obj):
--                sym = SectionFinder._normalize(symbol)
--                if sym in self.mapping:
--                    if not section in self.mapping[sym]:
--                        self.mapping[sym].append(section)
--                else:
--                    self.mapping[sym] = [section]
--
--    def getSections(self, symbol):
--        '''Given a symbol, returns a list of sections containing it or the
--        corresponding thunks. When the given symbol is a thunk, returns the
--        list of sections containing its corresponding normal symbol and the
--        other thunks for that symbol.'''
--        sym = SectionFinder._normalize(symbol)
--        if sym in self.mapping:
--            return self.mapping[sym]
--        return []
--
--    @staticmethod
--    def _normalize(symbol):
--        '''For normal symbols, return the given symbol. For thunks, return
--        the corresponding normal symbol.'''
--        if re.match('^_ZThn[0-9]+_', symbol):
--            return re.sub('^_ZThn[0-9]+_', '_Z', symbol)
--        return symbol
--
--    @staticmethod
--    def _getSymbols(obj):
--        '''Returns a list of (symbol, section) contained in the given object
--        file.'''
--        proc = subprocess.Popen(['objdump', '-t', obj], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
--        (stdout, stderr) = proc.communicate()
--        syms = []
--        for line in stdout.splitlines():
--            # Each line has the following format:
--            # <addr> [lgu!][w ][C ][W ][Ii ][dD ][FfO ] <section>\t<length> <symbol>
--            tmp = line.split(' ',1)
--            # This gives us ["<addr>", "[lgu!][w ][C ][W ][Ii ][dD ][FfO ] <section>\t<length> <symbol>"]
--            # We only need to consider cases where "<section>\t<length> <symbol>" is present,
--            # and where the [FfO] flag is either F (function) or O (object).
--            if len(tmp) > 1 and len(tmp[1]) > 6 and tmp[1][6] in ['O', 'F']:
--                tmp = tmp[1][8:].split()
--                # That gives us ["<section>","<length>", "<symbol>"]
--                syms.append((tmp[-1], tmp[0]))
--        return syms
--
--def print_command(out, args):
--    print >>out, "Executing: " + " ".join(args)
--    for tmp in [f for f in args.tmp if os.path.isfile(f)]:
--        print >>out, tmp + ":"
--        with open(tmp) as file:
--            print >>out, "".join(["    " + l for l in file.readlines()])
--    out.flush()
--
--def main(args, proc_callback=None):
--    parser = OptionParser()
--    parser.add_option("--extract", action="store_true", dest="extract",
--        help="when a library has no descriptor file, extract it first, when possible")
--    parser.add_option("--uselist", action="store_true", dest="uselist",
--        help="use a list file for objects when executing a command")
--    parser.add_option("--verbose", action="store_true", dest="verbose",
--        help="display executed command and temporary files content")
--    parser.add_option("--symbol-order", dest="symbol_order", metavar="FILE",
--        help="use the given list of symbols to order symbols in the resulting binary when using with a linker")
--
--    (options, args) = parser.parse_args(args)
--
--    with ExpandArgsMore(args) as args:
--        if options.extract:
--            args.extract()
--        if options.symbol_order:
--            args.orderSymbols(options.symbol_order)
--        if options.uselist:
--            args.makelist()
--
--        if options.verbose:
--            print_command(sys.stderr, args)
--        try:
--            proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
--            if proc_callback:
--                proc_callback(proc)
--        except Exception, e:
--            print >>sys.stderr, 'error: Launching', args, ':', e
--            raise e
--        (stdout, stderr) = proc.communicate()
--        if proc.returncode and not options.verbose:
--            print_command(sys.stderr, args)
--        sys.stderr.write(stdout)
--        sys.stderr.flush()
--        if proc.returncode:
--            return proc.returncode
--        return 0
--
--if __name__ == '__main__':
--    exit(main(sys.argv[1:]))
-diff --git a/config/expandlibs_gen.py b/config/expandlibs_gen.py
-deleted file mode 100644
---- a/config/expandlibs_gen.py
-+++ /dev/null
-@@ -1,41 +0,0 @@
--# 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/.
--
--'''Given a list of object files and library names, prints a library
--descriptor to standard output'''
--
--from __future__ import with_statement
--import sys
--import os
--import expandlibs_config as conf
--from expandlibs import LibDescriptor, isObject, ensureParentDir
--from optparse import OptionParser
--
--def generate(args):
--    desc = LibDescriptor()
--    for arg in args:
--        if isObject(arg):
--            if os.path.exists(arg):
--                desc['OBJS'].append(os.path.abspath(arg))
--            else:
--                raise Exception("File not found: %s" % arg)
--        elif os.path.splitext(arg)[1] == conf.LIB_SUFFIX:
--            if os.path.exists(arg) or os.path.exists(arg + conf.LIBS_DESC_SUFFIX):
--                desc['LIBS'].append(os.path.abspath(arg))
--            else:
--                raise Exception("File not found: %s" % arg)
--    return desc
--
--if __name__ == '__main__':
--    parser = OptionParser()
--    parser.add_option("-o", dest="output", metavar="FILE",
--        help="send output to the given file")
--
--    (options, args) = parser.parse_args()
--    if not options.output:
--        raise Exception("Missing option: -o")
--
--    ensureParentDir(options.output)
--    with open(options.output, 'w') as outfile:
--        print >>outfile, generate(args)
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -96,19 +96,18 @@ endif # ENABLE_TESTS
- #
- # If FORCE_STATIC_LIB is set, build a static library.
- # Otherwise, build a shared library.
- #
- 
- ifndef LIBRARY
- ifdef REAL_LIBRARY
- ifdef NO_EXPAND_LIBS
-+# Only build actual library if it is requested.
- LIBRARY			:= $(REAL_LIBRARY)
--else
--LIBRARY			:= $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
- endif
- endif
- endif
- 
- ifndef HOST_LIBRARY
- ifdef HOST_LIBRARY_NAME
- HOST_LIBRARY		:= $(LIB_PREFIX)$(HOST_LIBRARY_NAME).$(LIB_SUFFIX)
- endif
-@@ -416,32 +415,35 @@ ECHO := true
- QUIET := -q
- endif
- 
- # Do everything from scratch
- everything::
- 	$(MAKE) clean
- 	$(MAKE) all
- 
--STATIC_LIB_DEP = $(if $(wildcard $(1).$(LIBS_DESC_SUFFIX)),$(1).$(LIBS_DESC_SUFFIX),$(1))
--STATIC_LIBS_DEPS := $(foreach l,$(STATIC_LIBS),$(call STATIC_LIB_DEP,$(l)))
--
- # Dependencies which, if modified, should cause everything to rebuild
- GLOBAL_DEPS += Makefile $(addprefix $(DEPTH)/config/,$(INCLUDED_AUTOCONF_MK)) $(MOZILLA_DIR)/config/config.mk
- 
- ##############################################
- ifdef COMPILE_ENVIRONMENT
- OBJ_TARGETS = $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS)
- 
- compile:: host target
- 
- host:: $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(HOST_RUST_PROGRAMS) $(HOST_RUST_LIBRARY_FILE)
- 
- target:: $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(RUST_LIBRARY_FILE) $(RUST_PROGRAMS)
- 
-+ifndef LIBRARY
-+ifdef OBJS
-+target:: $(OBJS)
-+endif
-+endif
-+
- syms::
- 
- include $(MOZILLA_DIR)/config/makefiles/target_binaries.mk
- endif
- 
- ##############################################
- ifneq (1,$(NO_PROFILE_GUIDED_OPTIMIZE))
- ifdef MOZ_PROFILE_USE
-@@ -515,35 +517,35 @@ distclean::
- 	$(wildcard *.$(LIB_SUFFIX)) $(wildcard *$(DLL_SUFFIX)) \
- 	$(wildcard *.$(IMPORT_LIB_SUFFIX))
- 
- alltags:
- 	$(RM) TAGS
- 	find $(topsrcdir) -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' -o -name '*.idl' \) -print | $(TAG_PROGRAM)
- 
- define EXPAND_CC_OR_CXX
--$(if $(PROG_IS_C_ONLY_$(1)),$(EXPAND_CC),$(EXPAND_CCC))
-+$(if $(PROG_IS_C_ONLY_$(1)),$(CC),$(CCC))
- endef
- 
- # Workaround a bug of MSVC 2017 Update 8 (see bug 1485224)
- ifeq ($(CC_TYPE)_$(HOST_OS_ARCH)_$(MOZ_PROFILE_GENERATE),msvc_WINNT_1)
- LINKER_OUT=$(subst /,\,$1)
- else
- LINKER_OUT=$1
- endif
- 
- #
- # PROGRAM = Foo
- # creates OBJS, links with LIBS to create Foo
- #
--$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
-+$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
- 	$(REPORT_BUILD)
- 	@$(RM) $@.manifest
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(EXPAND_LINK) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
- ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$(notdir $@).manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest and $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
- 		else \
- 			echo 'Embedding manifest from $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
-@@ -554,140 +556,133 @@ ifdef MSMANIFEST_TOOL
- 	fi
- endif	# MSVC with manifest tool
- ifdef MOZ_PROFILE_GENERATE
- # touch it a few seconds into the future to work around FAT's
- # 2-second granularity
- 	touch -t `date +%Y%m%d%H%M.%S -d 'now+5seconds'` pgo.relink
- endif
- else # !WINNT || GNU_CC
--	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
- 	$(call py_action,check_binary,--target $@)
- endif # WINNT && !GNU_CC
- 
- ifdef ENABLE_STRIP
- 	$(STRIP) $(STRIP_FLAGS) $@
- endif
- ifdef MOZ_POST_PROGRAM_COMMAND
- 	$(MOZ_POST_PROGRAM_COMMAND) $@
- endif
- 
- $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
--	$(EXPAND_LIBS_EXEC) -- $(LINKER) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
-+	$(LINKER) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$@.manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$@.manifest and $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$@.manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
- 		else \
- 			echo 'Embedding manifest from $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
- 		fi; \
- 	elif test -f '$(srcdir)/$@.manifest'; then \
- 		echo 'Embedding manifest from $(srcdir)/$@.manifest'; \
- 		$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$@.manifest' -OUTPUTRESOURCE:$@\;1; \
- 	fi
- endif	# MSVC with manifest tool
- else
- ifeq ($(HOST_CPP_PROG_LINK),1)
--	$(EXPAND_LIBS_EXEC) -- $(HOST_CXX) -o $@ $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
-+	$(HOST_CXX) -o $@ $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- else
--	$(EXPAND_LIBS_EXEC) -- $(HOST_CC) -o $@ $(HOST_C_LDFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
-+	$(HOST_CC) -o $@ $(HOST_C_LDFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- endif # HOST_CPP_PROG_LINK
- endif
- ifndef CROSS_COMPILE
- 	$(call py_action,check_binary,--host $@)
- endif
- 
- #
- # This is an attempt to support generation of multiple binaries
- # in one directory, it assumes everything to compile Foo is in
- # Foo.o (from either Foo.c or Foo.cpp).
- #
- # SIMPLE_PROGRAMS = Foo Bar
- # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
- #
--$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
-+$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(EXPAND_LINK) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(LINKER) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
- ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
- 		rm -f $@.manifest; \
- 	fi
- endif	# MSVC with manifest tool
- else
--	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
- 	$(call py_action,check_binary,--target $@)
- endif # WINNT && !GNU_CC
- 
- ifdef ENABLE_STRIP
- 	$(STRIP) $(STRIP_FLAGS) $@
- endif
- ifdef MOZ_POST_PROGRAM_COMMAND
- 	$(MOZ_POST_PROGRAM_COMMAND) $@
- endif
- 
- $(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
--	$(EXPAND_LIBS_EXEC) -- $(LINKER) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
-+	$(LINKER) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- else
- ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
--	$(EXPAND_LIBS_EXEC) -- $(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXX_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
-+	$(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXX_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- else
--	$(EXPAND_LIBS_EXEC) -- $(HOST_CC) $(HOST_OUTOPTION)$@ $(HOST_C_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
-+	$(HOST_CC) $(HOST_OUTOPTION)$@ $(HOST_C_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
- endif
- endif
- ifndef CROSS_COMPILE
- 	$(call py_action,check_binary,--host $@)
- endif
- 
--$(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
-+$(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
--# Always remove both library and library descriptor
--	$(RM) $(REAL_LIBRARY) $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
--	$(EXPAND_AR) $(AR_FLAGS) $(OBJS) $(STATIC_LIBS)
--
--$(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $(OBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
--# When we only build a library descriptor, blow out any existing library
--	$(REPORT_BUILD)
--	$(if $(filter %.$(LIB_SUFFIX),$(LIBRARY)),,$(RM) $(REAL_LIBRARY))
--	$(EXPAND_LIBS_GEN) -o $@ $(OBJS) $(STATIC_LIBS)
-+	$(RM) $(REAL_LIBRARY)
-+	$(AR) $(AR_FLAGS) $(OBJS) $($@_OBJS)
- 
- ifeq ($(OS_ARCH),WINNT)
- # Import libraries are created by the rules creating shared libraries.
- # The rules to copy them to $(DIST)/lib depend on $(IMPORT_LIBRARY),
- # but make will happily consider the import library before it is refreshed
- # when rebuilding the corresponding shared library. Defining an empty recipe
- # for import libraries forces make to wait for the shared library recipe to
- # have run before considering other targets that depend on the import library.
- # See bug 795204.
- $(IMPORT_LIBRARY): $(SHARED_LIBRARY) ;
- endif
- 
- $(HOST_LIBRARY): $(HOST_OBJS) Makefile
- 	$(REPORT_BUILD)
- 	$(RM) $@
--	$(EXPAND_LIBS_EXEC) --extract -- $(HOST_AR) $(HOST_AR_FLAGS) $(HOST_OBJS)
-+	$(HOST_AR) $(HOST_AR_FLAGS) $(HOST_OBJS)
- 
- # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
- # so instead of deleting .o files after repacking them into a dylib, we make
- # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
- # so no need to conditionalize on OS version or debugging format.
- 
--$(SHARED_LIBRARY): $(OBJS) $(RESFILE) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
-+$(SHARED_LIBRARY): $(OBJS) $(RESFILE) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- ifndef INCREMENTAL_LINKER
- 	$(RM) $@
- endif
--	$(EXPAND_MKSHLIB) $(OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
-+	$(MKSHLIB) $($@_OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
- 	$(call py_action,check_binary,--target $@)
- 
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- ifdef MSMANIFEST_TOOL
- ifdef EMBED_MANIFEST_AT
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$@.manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$@.manifest and $@.manifest'; \
-diff --git a/config/tests/python.ini b/config/tests/python.ini
---- a/config/tests/python.ini
-+++ b/config/tests/python.ini
-@@ -1,5 +1,4 @@
- [test_mozbuild_reading.py]
--[unit-expandlibs.py]
- [unit-mozunit.py]
- [unit-nsinstall.py]
- [unit-printprereleasesuffix.py]
-diff --git a/config/tests/unit-expandlibs.py b/config/tests/unit-expandlibs.py
-deleted file mode 100644
---- a/config/tests/unit-expandlibs.py
-+++ /dev/null
-@@ -1,431 +0,0 @@
--import subprocess
--import unittest
--import sys
--import os
--import imp
--from tempfile import mkdtemp
--from shutil import rmtree
--import mozunit
--
--from UserString import UserString
--# Create a controlled configuration for use by expandlibs
--config_win = {
--    'AR': 'lib',
--    'AR_EXTRACT': '',
--    'DLL_PREFIX': '',
--    'LIB_PREFIX': '',
--    'OBJ_SUFFIX': '.obj',
--    'LIB_SUFFIX': '.lib',
--    'DLL_SUFFIX': '.dll',
--    'IMPORT_LIB_SUFFIX': '.lib',
--    'LIBS_DESC_SUFFIX': '.desc',
--    'EXPAND_LIBS_LIST_STYLE': 'list',
--}
--config_unix = {
--    'AR': 'ar',
--    'AR_EXTRACT': 'ar -x',
--    'DLL_PREFIX': 'lib',
--    'LIB_PREFIX': 'lib',
--    'OBJ_SUFFIX': '.o',
--    'LIB_SUFFIX': '.a',
--    'DLL_SUFFIX': '.so',
--    'IMPORT_LIB_SUFFIX': '',
--    'LIBS_DESC_SUFFIX': '.desc',
--    'EXPAND_LIBS_LIST_STYLE': 'linkerscript',
--}
--
--config = sys.modules['expandlibs_config'] = imp.new_module('expandlibs_config')
--
--from expandlibs import LibDescriptor, ExpandArgs, relativize
--from expandlibs_gen import generate
--from expandlibs_exec import ExpandArgsMore, SectionFinder
--
--def Lib(name):
--    return config.LIB_PREFIX + name + config.LIB_SUFFIX
--
--def Obj(name):
--    return name + config.OBJ_SUFFIX
--
--def Dll(name):
--    return config.DLL_PREFIX + name + config.DLL_SUFFIX
--
--def ImportLib(name):
--    if not len(config.IMPORT_LIB_SUFFIX): return Dll(name)
--    return config.LIB_PREFIX + name + config.IMPORT_LIB_SUFFIX
--
--class TestRelativize(unittest.TestCase):
--    def test_relativize(self):
--        '''Test relativize()'''
--        os_path_exists = os.path.exists
--        def exists(path):
--            return True
--        os.path.exists = exists
--        self.assertEqual(relativize(os.path.abspath(os.curdir)), os.curdir)
--        self.assertEqual(relativize(os.path.abspath(os.pardir)), os.pardir)
--        self.assertEqual(relativize(os.path.join(os.curdir, 'a')), 'a')
--        self.assertEqual(relativize(os.path.join(os.path.abspath(os.curdir), 'a')), 'a')
--        # relativize is expected to return the absolute path if it is shorter
--        self.assertEqual(relativize(os.sep), os.sep)
--        os.path.exists = os.path.exists
--
--class TestLibDescriptor(unittest.TestCase):
--    def test_serialize(self):
--        '''Test LibDescriptor's serialization'''
--        desc = LibDescriptor()
--        desc[LibDescriptor.KEYS[0]] = ['a', 'b']
--        self.assertEqual(str(desc), "{0} = a b".format(LibDescriptor.KEYS[0]))
--        desc['unsupported-key'] = ['a']
--        self.assertEqual(str(desc), "{0} = a b".format(LibDescriptor.KEYS[0]))
--        desc[LibDescriptor.KEYS[1]] = ['c', 'd', 'e']
--        self.assertEqual(str(desc),
--                         "{0} = a b\n{1} = c d e"
--                         .format(LibDescriptor.KEYS[0], LibDescriptor.KEYS[1]))
--        desc[LibDescriptor.KEYS[0]] = []
--        self.assertEqual(str(desc), "{0} = c d e".format(LibDescriptor.KEYS[1]))
--
--    def test_read(self):
--        '''Test LibDescriptor's initialization'''
--        desc_list = ["# Comment",
--                     "{0} = a b".format(LibDescriptor.KEYS[1]),
--                     "", # Empty line
--                     "foo = bar", # Should be discarded
--                     "{0} = c d e".format(LibDescriptor.KEYS[0])]
--        desc = LibDescriptor(desc_list)
--        self.assertEqual(desc[LibDescriptor.KEYS[1]], ['a', 'b'])
--        self.assertEqual(desc[LibDescriptor.KEYS[0]], ['c', 'd', 'e'])
--        self.assertEqual(False, 'foo' in desc)
--
--def wrap_method(conf, wrapped_method):
--    '''Wrapper used to call a test with a specific configuration'''
--    def _method(self):
--        for key in conf:
--            setattr(config, key, conf[key])
--        self.init()
--        try:
--            wrapped_method(self)
--        except:
--            raise
--        finally:
--            self.cleanup()
--    return _method
--
--class ReplicateTests(type):
--    '''Replicates tests for unix and windows variants'''
--    def __new__(cls, clsName, bases, dict):
--        for name in [key for key in dict if key.startswith('test_')]:
--            dict[name + '_unix'] = wrap_method(config_unix, dict[name])
--            dict[name + '_unix'].__doc__ = dict[name].__doc__ + ' (unix)'
--            dict[name + '_win'] = wrap_method(config_win, dict[name])
--            dict[name + '_win'].__doc__ = dict[name].__doc__ + ' (win)'
--            del dict[name]
--        return type.__new__(cls, clsName, bases, dict)
--
--class TestCaseWithTmpDir(unittest.TestCase):
--    __metaclass__ = ReplicateTests
--    def init(self):
--        self.tmpdir = os.path.abspath(mkdtemp(dir=os.curdir))
--
--    def cleanup(self):
--        rmtree(self.tmpdir)
--
--    def touch(self, files):
--        for f in files:
--            open(f, 'w').close()
--
--    def tmpfile(self, *args):
--        return os.path.join(self.tmpdir, *args)
--
--class TestExpandLibsGen(TestCaseWithTmpDir):
--    def test_generate(self):
--        '''Test library descriptor generation'''
--        files = [self.tmpfile(f) for f in
--                 [Lib('a'), Obj('b'), Lib('c'), Obj('d'), Obj('e'), Lib('f')]]
--        self.touch(files[:-1])
--        self.touch([files[-1] + config.LIBS_DESC_SUFFIX])
--
--        desc = generate(files)
--        self.assertEqual(desc['OBJS'], [self.tmpfile(Obj(s)) for s in ['b', 'd', 'e']])
--        self.assertEqual(desc['LIBS'], [self.tmpfile(Lib(s)) for s in ['a', 'c', 'f']])
--
--        self.assertRaises(Exception, generate, files + [self.tmpfile(Obj('z'))])
--        self.assertRaises(Exception, generate, files + [self.tmpfile(Lib('y'))])
--
--class TestExpandInit(TestCaseWithTmpDir):
--    def init(self):
--        ''' Initializes test environment for library expansion tests'''
--        super(TestExpandInit, self).init()
--        # Create 2 fake libraries, each containing 3 objects, and the second
--        # including the first one and another library.
--        os.mkdir(self.tmpfile('libx'))
--        os.mkdir(self.tmpfile('liby'))
--        self.libx_files = [self.tmpfile('libx', Obj(f)) for f in ['g', 'h', 'i']]
--        self.liby_files = [self.tmpfile('liby', Obj(f)) for f in ['j', 'k', 'l']] + [self.tmpfile('liby', Lib('z'))]
--        self.touch(self.libx_files + self.liby_files)
--        with open(self.tmpfile('libx', Lib('x') + config.LIBS_DESC_SUFFIX), 'w') as f:
--            f.write(str(generate(self.libx_files)))
--        with open(self.tmpfile('liby', Lib('y') + config.LIBS_DESC_SUFFIX), 'w') as f:
--            f.write(str(generate(self.liby_files + [self.tmpfile('libx', Lib('x'))])))
--
--        # Create various objects and libraries 
--        self.arg_files = [self.tmpfile(f) for f in [Lib('a'), Obj('b'), Obj('c'), Lib('d'), Obj('e')]]
--        # We always give library names (LIB_PREFIX/SUFFIX), even for
--        # dynamic/import libraries
--        self.files = self.arg_files + [self.tmpfile(ImportLib('f'))]
--        self.arg_files += [self.tmpfile(Lib('f'))]
--        self.touch(self.files)
--
--    def assertRelEqual(self, args1, args2):
--        self.assertEqual(args1, [relativize(a) for a in args2])
--
--class TestExpandArgs(TestExpandInit):
--    def test_expand(self):
--        '''Test library expansion'''
--        # Expanding arguments means libraries with a descriptor are expanded
--        # with the descriptor content, and import libraries are used when
--        # a library doesn't exist
--        args = ExpandArgs(['foo', '-bar'] + self.arg_files + [self.tmpfile('liby', Lib('y'))])
--        self.assertRelEqual(args, ['foo', '-bar'] + self.files + self.liby_files + self.libx_files) 
--
--        # When a library exists at the same time as a descriptor, we still use
--        # the descriptor.
--        self.touch([self.tmpfile('libx', Lib('x'))])
--        args = ExpandArgs(['foo', '-bar'] + self.arg_files + [self.tmpfile('liby', Lib('y'))])
--        self.assertRelEqual(args, ['foo', '-bar'] + self.files + self.liby_files + self.libx_files)
--
--        self.touch([self.tmpfile('liby', Lib('y'))])
--        args = ExpandArgs(['foo', '-bar'] + self.arg_files + [self.tmpfile('liby', Lib('y'))])
--        self.assertRelEqual(args, ['foo', '-bar'] + self.files + self.liby_files + self.libx_files)
--
--class TestExpandArgsMore(TestExpandInit):
--    def test_makelist(self):
--        '''Test grouping object files in lists'''
--        # ExpandArgsMore does the same as ExpandArgs
--        with ExpandArgsMore(['foo', '-bar'] + self.arg_files + [self.tmpfile('liby', Lib('y'))]) as args:
--            self.assertRelEqual(args, ['foo', '-bar'] + self.files + self.liby_files + self.libx_files) 
--
--            # But also has an extra method replacing object files with a list
--            args.makelist()
--            # self.files has objects at #1, #2, #4
--            self.assertRelEqual(args[:3], ['foo', '-bar'] + self.files[:1])
--            self.assertRelEqual(args[4:], [self.files[3]] + self.files[5:] + [self.tmpfile('liby', Lib('z'))])
--
--            # Check the list file content
--            objs = [f for f in self.files + self.liby_files + self.libx_files if f.endswith(config.OBJ_SUFFIX)]
--            if config.EXPAND_LIBS_LIST_STYLE == "linkerscript":
--                self.assertNotEqual(args[3][0], '@')
--                filename = args[3]
--                content = ['INPUT("{0}")'.format(relativize(f)) for f in objs]
--                with open(filename, 'r') as f:
--                    self.assertEqual([l.strip() for l in f.readlines() if len(l.strip())], content)
--            elif config.EXPAND_LIBS_LIST_STYLE == "list":
--                self.assertEqual(args[3][0], '@')
--                filename = args[3][1:]
--                content = objs
--                with open(filename, 'r') as f:
--                    self.assertRelEqual([l.strip() for l in f.readlines() if len(l.strip())], content)
--
--            tmp = args.tmp
--        # Check that all temporary files are properly removed
--        self.assertEqual(True, all([not os.path.exists(f) for f in tmp]))
--
--    def test_extract(self):
--        '''Test library extraction'''
--        # Divert subprocess.call
--        subprocess_call = subprocess.call
--        subprocess_check_output = subprocess.check_output
--        def call(args, **kargs):
--            if config.AR == 'lib':
--                self.assertEqual(args[:2], [config.AR, '-NOLOGO'])
--                self.assertTrue(args[2].startswith('-EXTRACT:'))
--                extract = [args[2][len('-EXTRACT:'):]]
--                self.assertTrue(extract)
--                args = args[3:]
--            else:
--                # The command called is always AR_EXTRACT
--                ar_extract = config.AR_EXTRACT.split()
--                self.assertEqual(args[:len(ar_extract)], ar_extract)
--                args = args[len(ar_extract):]
--            # Remaining argument is always one library
--            self.assertEqual(len(args), 1)
--            arg = args[0]
--            self.assertEqual(os.path.splitext(arg)[1], config.LIB_SUFFIX)
--            # Simulate file extraction
--            lib = os.path.splitext(os.path.basename(arg))[0]
--            if config.AR != 'lib':
--                extract = [lib, lib + '2']
--            extract = [os.path.join(kargs['cwd'], f) for f in extract]
--            if config.AR != 'lib':
--                extract = [Obj(f) for f in extract]
--            if not lib in extracted:
--                extracted[lib] = []
--            extracted[lib].extend(extract)
--            self.touch(extract)
--        subprocess.call = call
--
--        def check_output(args, **kargs):
--            # The command called is always AR
--            ar = config.AR
--            self.assertEqual(args[0:3], [ar, '-NOLOGO', '-LIST'])
--            # Remaining argument is always one library
--            self.assertRelEqual([os.path.splitext(arg)[1] for arg in args[3:]],
--[config.LIB_SUFFIX])
--            # Simulate LIB -NOLOGO -LIST
--            lib = os.path.splitext(os.path.basename(args[3]))[0]
--            return '%s\n%s\n' % (Obj(lib), Obj(lib + '2'))
--        subprocess.check_output = check_output
--
--        # ExpandArgsMore does the same as ExpandArgs
--        self.touch([self.tmpfile('liby', Lib('y'))])
--        for iteration in (1, 2):
--            with ExpandArgsMore(['foo', '-bar'] + self.arg_files + [self.tmpfile('liby', Lib('y'))]) as args:
--                files = self.files + self.liby_files + self.libx_files
--
--                self.assertRelEqual(args, ['foo', '-bar'] + files)
--
--                extracted = {}
--                # ExpandArgsMore also has an extra method extracting static libraries
--                # when possible
--                args.extract()
--
--                # With AR_EXTRACT, it uses the descriptors when there are, and
--                # actually
--                # extracts the remaining libraries
--                extracted_args = []
--                for f in files:
--                    if f.endswith(config.LIB_SUFFIX):
--                        base = os.path.splitext(os.path.basename(f))[0]
--                        # On the first iteration, we test the behavior of
--                        # extracting archives that don't have a copy of their
--                        # contents next to them, which is to use the file
--                        # extracted from the archive in a temporary directory.
--                        # On the second iteration, we test extracting archives
--                        # that do have a copy of their contents next to them,
--                        # in which case those contents are used instead of the
--                        # temporarily extracted files.
--                        if iteration == 1:
--                            extracted_args.extend(sorted(extracted[base]))
--                        else:
--                            dirname = os.path.dirname(f[len(self.tmpdir)+1:])
--                            if base.endswith('f'):
--                                dirname = os.path.join(dirname, 'foo', 'bar')
--                            extracted_args.extend([self.tmpfile(dirname, Obj(base)), self.tmpfile(dirname, Obj(base + '2'))])
--                    else:
--                        extracted_args.append(f)
--                self.assertRelEqual(args, ['foo', '-bar'] + extracted_args)
--
--                tmp = args.tmp
--            # Check that all temporary files are properly removed
--            self.assertEqual(True, all([not os.path.exists(f) for f in tmp]))
--
--            # Create archives contents next to them for the second iteration.
--            base = os.path.splitext(Lib('_'))[0]
--            self.touch(self.tmpfile(Obj(base.replace('_', suffix))) for suffix in ('a', 'a2', 'd', 'd2'))
--            try:
--                os.makedirs(self.tmpfile('foo', 'bar'))
--            except:
--                pass
--            self.touch(self.tmpfile('foo', 'bar', Obj(base.replace('_', suffix))) for suffix in ('f', 'f2'))
--            self.touch(self.tmpfile('liby', Obj(base.replace('_', suffix))) for suffix in ('z', 'z2'))
--
--        # Restore subprocess.call and subprocess.check_output
--        subprocess.call = subprocess_call
--        subprocess.check_output = subprocess_check_output
--
--class FakeProcess(object):
--    def __init__(self, out, err = ''):
--        self.out = out
--        self.err = err
--
--    def communicate(self):
--        return (self.out, self.err)
--
--OBJDUMPS = {
--'foo.o': '''
--00000000 g     F .text\t00000001 foo
--00000000 g     F .text._Z6foobarv\t00000001 _Z6foobarv
--00000000 g     F .text.hello\t00000001 hello
--00000000 g     F .text._ZThn4_6foobarv\t00000001 _ZThn4_6foobarv
--''',
--'bar.o': '''
--00000000 g     F .text.hi\t00000001 hi
--00000000 g     F .text.hot._Z6barbazv\t00000001 .hidden _Z6barbazv
--''',
--}
--
--PRINT_ICF = '''
--ld: ICF folding section '.text.hello' in file 'foo.o'into '.text.hi' in file 'bar.o'
--ld: ICF folding section '.foo' in file 'foo.o'into '.foo' in file 'bar.o'
--'''
--
--class SubprocessPopen(object):
--    def __init__(self, test):
--        self.test = test
--
--    def __call__(self, args, stdout = None, stderr = None):
--        self.test.assertEqual(stdout, subprocess.PIPE)
--        self.test.assertEqual(stderr, subprocess.PIPE)
--        if args[0] == 'objdump':
--            self.test.assertEqual(args[1], '-t')
--            self.test.assertTrue(args[2] in OBJDUMPS)
--            return FakeProcess(OBJDUMPS[args[2]])
--        else:
--            return FakeProcess('', PRINT_ICF)
--
--class TestSectionFinder(unittest.TestCase):
--    def test_getSections(self):
--        '''Test SectionFinder'''
--        # Divert subprocess.Popen
--        subprocess_popen = subprocess.Popen
--        subprocess.Popen = SubprocessPopen(self)
--        config.EXPAND_LIBS_ORDER_STYLE = 'linkerscript'
--        config.OBJ_SUFFIX = '.o'
--        config.LIB_SUFFIX = '.a'
--        finder = SectionFinder(['foo.o', 'bar.o'])
--        self.assertEqual(finder.getSections('foobar'), [])
--        self.assertEqual(finder.getSections('_Z6barbazv'), ['.text.hot._Z6barbazv'])
--        self.assertEqual(finder.getSections('_Z6foobarv'), ['.text._Z6foobarv', '.text._ZThn4_6foobarv'])
--        self.assertEqual(finder.getSections('_ZThn4_6foobarv'), ['.text._Z6foobarv', '.text._ZThn4_6foobarv'])
--        subprocess.Popen = subprocess_popen
--
--class TestSymbolOrder(unittest.TestCase):
--    def test_getOrderedSections(self):
--        '''Test ExpandMoreArgs' _getOrderedSections'''
--        # Divert subprocess.Popen
--        subprocess_popen = subprocess.Popen
--        subprocess.Popen = SubprocessPopen(self)
--        config.EXPAND_LIBS_ORDER_STYLE = 'linkerscript'
--        config.OBJ_SUFFIX = '.o'
--        config.LIB_SUFFIX = '.a'
--        config.LD_PRINT_ICF_SECTIONS = ''
--        args = ExpandArgsMore(['foo', '-bar', 'bar.o', 'foo.o'])
--        self.assertEqual(args._getOrderedSections(['_Z6foobarv', '_Z6barbazv']), ['.text._Z6foobarv', '.text._ZThn4_6foobarv', '.text.hot._Z6barbazv'])
--        self.assertEqual(args._getOrderedSections(['_ZThn4_6foobarv', '_Z6barbazv']), ['.text._Z6foobarv', '.text._ZThn4_6foobarv', '.text.hot._Z6barbazv'])
--        subprocess.Popen = subprocess_popen
--
--    def test_getFoldedSections(self):
--        '''Test ExpandMoreArgs' _getFoldedSections'''
--        # Divert subprocess.Popen
--        subprocess_popen = subprocess.Popen
--        subprocess.Popen = SubprocessPopen(self)
--        config.LD_PRINT_ICF_SECTIONS = '-Wl,--print-icf-sections'
--        args = ExpandArgsMore(['foo', '-bar', 'bar.o', 'foo.o'])
--        self.assertEqual(args._getFoldedSections(), {'.text.hello': ['.text.hi'], '.text.hi': ['.text.hello']})
--        subprocess.Popen = subprocess_popen
--
--    def test_getOrderedSectionsWithICF(self):
--        '''Test ExpandMoreArgs' _getOrderedSections, with ICF'''
--        # Divert subprocess.Popen
--        subprocess_popen = subprocess.Popen
--        subprocess.Popen = SubprocessPopen(self)
--        config.EXPAND_LIBS_ORDER_STYLE = 'linkerscript'
--        config.OBJ_SUFFIX = '.o'
--        config.LIB_SUFFIX = '.a'
--        config.LD_PRINT_ICF_SECTIONS = '-Wl,--print-icf-sections'
--        args = ExpandArgsMore(['foo', '-bar', 'bar.o', 'foo.o'])
--        self.assertEqual(args._getOrderedSections(['hello', '_Z6barbazv']), ['.text.hello', '.text.hi', '.text.hot._Z6barbazv'])
--        self.assertEqual(args._getOrderedSections(['_ZThn4_6foobarv', 'hi', '_Z6barbazv']), ['.text._Z6foobarv', '.text._ZThn4_6foobarv', '.text.hi', '.text.hello', '.text.hot._Z6barbazv'])
--        subprocess.Popen = subprocess_popen
--
--
--if __name__ == '__main__':
--    mozunit.main(runwith='unittest')
-diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py
---- a/python/mozbuild/mozbuild/backend/common.py
-+++ b/python/mozbuild/mozbuild/backend/common.py
-@@ -22,30 +22,37 @@ from mozbuild.frontend.data import (
-     BaseProgram,
-     ChromeManifestEntry,
-     ConfigFileSubstitution,
-     Exports,
-     FinalTargetPreprocessedFiles,
-     FinalTargetFiles,
-     GeneratedSources,
-     GnProjectData,
-+    HostLibrary,
-+    HostRustLibrary,
-     IPDLCollection,
-+    RustLibrary,
-     SharedLibrary,
-+    StaticLibrary,
-     UnifiedSources,
-     XPIDLFile,
-     WebIDLCollection,
- )
- from mozbuild.jar import (
-     DeprecatedJarManifest,
-     JarManifestParser,
- )
- from mozbuild.preprocessor import Preprocessor
- from mozpack.chrome.manifest import parse_manifest_line
- 
--from mozbuild.util import group_unified_files
-+from mozbuild.util import (
-+    group_unified_files,
-+    mkdir,
-+)
- 
- class XPIDLManager(object):
-     """Helps manage XPCOM IDLs in the context of the build system."""
-     def __init__(self, config):
-         self.config = config
-         self.topsrcdir = config.topsrcdir
-         self.topobjdir = config.topobjdir
- 
-@@ -190,16 +197,97 @@ class CommonBackend(BuildBackend):
- 
-         # Write out a file listing generated sources.
-         with self._write_file(mozpath.join(topobjdir, 'generated-sources.json')) as fh:
-             d = {
-                 'sources': sorted(self._generated_sources),
-             }
-             json.dump(d, fh, sort_keys=True, indent=4)
- 
-+    def _expand_libs(self, input_bin):
-+        os_libs = []
-+        shared_libs = []
-+        static_libs = []
-+        objs = []
-+
-+        seen_objs = set()
-+        seen_libs = set()
-+
-+        def add_objs(lib):
-+            for o in lib.objs:
-+                if o not in seen_objs:
-+                    seen_objs.add(o)
-+                    objs.append(o)
-+
-+        def expand(lib, recurse_objs, system_libs):
-+            if isinstance(lib, StaticLibrary):
-+                if lib.no_expand_lib:
-+                    static_libs.append(lib)
-+                    recurse_objs = False
-+                elif recurse_objs:
-+                    add_objs(lib)
-+
-+                for l in lib.linked_libraries:
-+                    expand(l, recurse_objs, system_libs)
-+
-+                if system_libs:
-+                    for l in lib.linked_system_libs:
-+                        if l not in seen_libs:
-+                            seen_libs.add(l)
-+                            os_libs.append(l)
-+
-+            elif isinstance(lib, SharedLibrary):
-+                if lib not in seen_libs:
-+                    seen_libs.add(lib)
-+                    shared_libs.append(lib)
-+
-+        add_objs(input_bin)
-+
-+        system_libs = not isinstance(input_bin, StaticLibrary)
-+        for lib in input_bin.linked_libraries:
-+            if isinstance(lib, RustLibrary):
-+                continue
-+            elif isinstance(lib, StaticLibrary):
-+                expand(lib, True, system_libs)
-+            elif isinstance(lib, SharedLibrary):
-+                if lib not in seen_libs:
-+                    seen_libs.add(lib)
-+                    shared_libs.append(lib)
-+
-+        for lib in input_bin.linked_system_libs:
-+            if lib not in seen_libs:
-+                seen_libs.add(lib)
-+                os_libs.append(lib)
-+
-+        return objs, shared_libs, os_libs, static_libs
-+
-+    def _make_list_file(self, objdir, objs, name):
-+        if not objs:
-+            return None
-+        list_style = self.environment.substs.get('EXPAND_LIBS_LIST_STYLE')
-+        list_file_path = mozpath.join(objdir, name)
-+        objs = [os.path.relpath(o, objdir) for o in objs]
-+        if list_style == 'linkerscript':
-+            ref = list_file_path
-+            content = '\n'.join('INPUT("%s")' % o for o in objs)
-+        elif list_style == 'filelist':
-+            ref = "-Wl,-filelist," + list_file_path
-+            content = '\n'.join(objs)
-+        elif list_style == 'list':
-+            ref = "@" + list_file_path
-+            content = '\n'.join(objs)
-+        else:
-+            return None
-+
-+        mkdir(objdir)
-+        with self._write_file(list_file_path) as fh:
-+            fh.write(content)
-+
-+        return ref
-+
-     def _handle_generated_sources(self, files):
-         self._generated_sources.update(mozpath.relpath(f, self.environment.topobjdir) for f in files)
- 
-     def _handle_webidl_collection(self, webidls):
- 
-         bindings_dir = mozpath.join(self.environment.topobjdir, 'dom', 'bindings')
- 
-         all_inputs = set(webidls.all_static_sources())
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1282,77 +1282,78 @@ class RecursiveMakeBackend(CommonBackend
-     def _process_host_library(self, libdef, backend_file):
-         backend_file.write('HOST_LIBRARY_NAME = %s\n' % libdef.basename)
- 
-     def _build_target_for_obj(self, obj):
-         return '%s/%s' % (mozpath.relpath(obj.objdir,
-             self.environment.topobjdir), obj.KIND)
- 
-     def _process_linked_libraries(self, obj, backend_file):
--        def write_shared_and_system_libs(lib):
--            for l in lib.linked_libraries:
--                if isinstance(l, (StaticLibrary, RustLibrary)):
--                    write_shared_and_system_libs(l)
--                else:
--                    backend_file.write_once('SHARED_LIBS += %s/%s\n'
--                        % (pretty_relpath(l), l.import_name))
--            for l in lib.linked_system_libs:
--                backend_file.write_once('OS_LIBS += %s\n' % l)
--
-         def pretty_relpath(lib):
-             return '$(DEPTH)/%s' % mozpath.relpath(lib.objdir, topobjdir)
- 
-         topobjdir = mozpath.normsep(obj.topobjdir)
-         # This will create the node even if there aren't any linked libraries.
-         build_target = self._build_target_for_obj(obj)
-         self._compile_graph[build_target]
- 
-+        objs, shared_libs, os_libs, static_libs = self._expand_libs(obj)
-+
-+        if obj.KIND == 'target':
-+            obj_target = obj.name
-+            if isinstance(obj, Program):
-+                obj_target = self._pretty_path(obj.output_path, backend_file)
-+
-+            objs_ref = ' \\\n    '.join(os.path.relpath(o, obj.objdir)
-+                                        for o in objs)
-+            # Don't bother with a list file if we're only linking objects built
-+            # in this directory or building a real static library. This
-+            # accommodates clang-plugin, where we would otherwise pass an
-+            # incorrect list file format to the host compiler as well as when
-+            # creating an archive with AR, which doesn't understand list files.
-+            if (objs == obj.objs and not isinstance(obj, StaticLibrary) or
-+                isinstance(obj, StaticLibrary) and obj.no_expand_lib):
-+                backend_file.write_once('%s_OBJS := %s\n' %
-+                                        (obj.name, objs_ref))
-+                backend_file.write_once('%s: %s\n' % (obj_target, objs_ref))
-+            elif not isinstance(obj, StaticLibrary):
-+                list_file_path = '%s.list' % obj.name.replace('.', '_')
-+                list_file_ref = self._make_list_file(obj.objdir, objs,
-+                                                     list_file_path)
-+                backend_file.write_once('%s_OBJS := %s\n' %
-+                                        (obj.name, list_file_ref))
-+                backend_file.write_once('%s: %s\n' % (obj_target, list_file_path))
-+                backend_file.write_once('%s: %s\n' % (obj_target, objs_ref))
-+
-+        for lib in shared_libs:
-+            backend_file.write_once('SHARED_LIBS += %s/%s\n' %
-+                                    (pretty_relpath(lib), lib.import_name))
-+        for lib in static_libs:
-+            backend_file.write_once('STATIC_LIBS += %s/%s\n' %
-+                                    (pretty_relpath(lib), lib.import_name))
-+        for lib in os_libs:
-+            if obj.KIND == 'target':
-+                backend_file.write_once('OS_LIBS += %s\n' % lib)
-+            else:
-+                backend_file.write_once('HOST_EXTRA_LIBS += %s\n' % lib)
-+
-         for lib in obj.linked_libraries:
-             if not isinstance(lib, ExternalLibrary):
-                 self._compile_graph[build_target].add(
-                     self._build_target_for_obj(lib))
--            relpath = pretty_relpath(lib)
--            if isinstance(obj, Library):
--                if isinstance(lib, RustLibrary):
--                    # We don't need to do anything here; we will handle
--                    # linkage for any RustLibrary elsewhere.
--                    continue
--                elif isinstance(lib, StaticLibrary):
--                    backend_file.write_once('STATIC_LIBS += %s/%s\n'
--                                        % (relpath, lib.import_name))
--                    if isinstance(obj, SharedLibrary):
--                        write_shared_and_system_libs(lib)
--                elif isinstance(obj, SharedLibrary):
--                    backend_file.write_once('SHARED_LIBS += %s/%s\n'
--                                        % (relpath, lib.import_name))
--            elif isinstance(obj, (Program, SimpleProgram)):
--                if isinstance(lib, StaticLibrary):
--                    backend_file.write_once('STATIC_LIBS += %s/%s\n'
--                                        % (relpath, lib.import_name))
--                    write_shared_and_system_libs(lib)
--                else:
--                    backend_file.write_once('SHARED_LIBS += %s/%s\n'
--                                        % (relpath, lib.import_name))
--            elif isinstance(obj, (HostLibrary, HostProgram, HostSimpleProgram)):
--                assert isinstance(lib, (HostLibrary, HostRustLibrary))
--                backend_file.write_once('HOST_LIBS += %s/%s\n'
--                                   % (relpath, lib.import_name))
-+            if isinstance(lib, (HostLibrary, HostRustLibrary)):
-+                backend_file.write_once('HOST_LIBS += %s/%s\n' %
-+                                        (pretty_relpath(lib), lib.import_name))
- 
-         # We have to link any Rust libraries after all intermediate static
-         # libraries have been listed to ensure that the Rust libraries are
-         # searched after the C/C++ objects that might reference Rust symbols.
-         if isinstance(obj, SharedLibrary):
-             self._process_rust_libraries(obj, backend_file, pretty_relpath)
- 
--        for lib in obj.linked_system_libs:
--            if obj.KIND == 'target':
--                backend_file.write_once('OS_LIBS += %s\n' % lib)
--            else:
--                backend_file.write_once('HOST_EXTRA_LIBS += %s\n' % lib)
--
-         # Process library-based defines
-         self._process_defines(obj.lib_defines, backend_file)
- 
-     def _process_rust_libraries(self, obj, backend_file, pretty_relpath):
-         assert isinstance(obj, SharedLibrary)
- 
-         # If this library does not depend on any Rust libraries, then we are done.
-         direct_linked = [l for l in obj.linked_libraries if isinstance(l, RustLibrary)]
-diff --git a/python/mozbuild/mozbuild/test/backend/common.py b/python/mozbuild/mozbuild/test/backend/common.py
---- a/python/mozbuild/mozbuild/test/backend/common.py
-+++ b/python/mozbuild/mozbuild/test/backend/common.py
-@@ -209,16 +209,17 @@ CONFIGS = defaultdict(lambda: {
-         'defines': {},
-         'non_global_defines': [],
-         'substs': {
-             'COMPILE_ENVIRONMENT': '1',
-             'LIB_SUFFIX': 'a',
-             'BIN_SUFFIX': '.exe',
-             'DLL_SUFFIX': '.so',
-             'OBJ_SUFFIX': 'o',
-+            'EXPAND_LIBS_LIST_STYLE': 'list',
-         },
-     },
- })
- 
- 
- class BackendTester(unittest.TestCase):
-     def setUp(self):
-         self._old_env = dict(os.environ)
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar2.cc b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar2.cc
-new file mode 100644
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar_helper/bar_helper1.cpp b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar_helper/bar_helper1.cpp
-new file mode 100644
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar_helper/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar_helper/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar_helper/moz.build
-@@ -0,0 +1,8 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+SOURCES += [
-+    'bar_helper1.cpp',
-+]
-+
-+FINAL_LIBRARY = 'bar'
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.build b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.build
---- a/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.build
-+++ b/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.build
-@@ -1,8 +1,13 @@
- # Any copyright is dedicated to the Public Domain.
- # http://creativecommons.org/publicdomain/zero/1.0/
- 
- SOURCES += [
-     'bar1.cc',
-+    'bar2.cc',
-+]
-+
-+DIRS += [
-+    'bar_helper',
- ]
- 
- FINAL_LIBRARY = 'bar'
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-@@ -992,40 +992,34 @@ class TestRecursiveMakeBackend(BackendTe
- 
-             for line in lines:
-                 self.assertNotIn('LIB_IS_C_ONLY', line)
- 
-     def test_linkage(self):
-         env = self._consume('linkage', RecursiveMakeBackend)
-         expected_linkage = {
-             'prog': {
--                'SHARED_LIBS': ['$(DEPTH)/shared/baz', '$(DEPTH)/prog/qux/qux'],
--                'STATIC_LIBS': ['$(DEPTH)/static/bar%s' % env.lib_suffix],
-+                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux.so',
-+                                '$(DEPTH)/shared/baz.so'],
-+                'STATIC_LIBS': ['$(DEPTH)/real/foo.a'],
-                 'OS_LIBS': ['-lfoo', '-lbaz', '-lbar'],
-             },
-             'shared': {
-                 'OS_LIBS': ['-lfoo'],
--                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux'],
--                'STATIC_LIBS': ['$(DEPTH)/shared/baz/shared_baz%s' %
--                                env.lib_suffix],
-+                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux.so'],
-+                'STATIC_LIBS': [],
-             },
-             'static': {
--                'STATIC_LIBS': [
--                    '$(DEPTH)/static/bar/static_bar.a',
--                    '$(DEPTH)/real/foo.a',
--                ],
-+                'STATIC_LIBS': ['$(DEPTH)/real/foo.a'],
-                 'OS_LIBS': ['-lbar'],
--                'SHARED_LIBS': [],
-+                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux.so'],
-             },
-             'real': {
--                'STATIC_LIBS': [
--                    '$(DEPTH)/shared/baz_s%s' % env.lib_suffix,
--                    '$(DEPTH)/real/foo/real_foo%s' % env.lib_suffix,
--                ],
--                'SHARED_LIBS': [],
-+                'STATIC_LIBS': [],
-+                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux.so'],
-                 'OS_LIBS': ['-lbaz'],
-             }
-         }
-         actual_linkage = {}
-         for name in expected_linkage.keys():
-             with open(os.path.join(env.topobjdir, name, 'backend.mk'), 'rb') as fh:
-                 actual_linkage[name] = [line.rstrip() for line in fh.readlines()]
-         for name in expected_linkage:
-@@ -1033,16 +1027,44 @@ class TestRecursiveMakeBackend(BackendTe
-                 for val in expected_linkage[name][var]:
-                     line = '%s += %s' % (var, val)
-                     self.assertIn(line,
-                                   actual_linkage[name])
-                     actual_linkage[name].remove(line)
-                 for line in actual_linkage[name]:
-                     self.assertNotIn('%s +=' % var, line)
- 
-+    def test_list_files(self):
-+        env = self._consume('linkage', RecursiveMakeBackend)
-+        expected_list_files = {
-+            'prog/MyProgram_exe.list': [
-+                '../static/bar/bar1.o',
-+                '../static/bar/bar2.o',
-+                '../static/bar/bar_helper/bar_helper1.o',
-+            ],
-+            'shared/baz_so.list': [
-+                'baz/baz1.o',
-+            ],
-+        }
-+        actual_list_files = {}
-+        for name in expected_list_files.keys():
-+            with open(os.path.join(env.topobjdir, name), 'rb') as fh:
-+                actual_list_files[name] = [mozpath.normsep(line.rstrip())
-+                                           for line in fh.readlines()]
-+        for name in expected_list_files:
-+            self.assertEqual(actual_list_files[name],
-+                             expected_list_files[name])
-+
-+        # We don't produce a list file for a shared library composed only of
-+        # object files in its directory, but instead list them in a variable.
-+        with open(os.path.join(env.topobjdir, 'prog', 'qux', 'backend.mk'), 'rb') as fh:
-+            lines = [line.rstrip() for line in fh.readlines()]
-+
-+        self.assertIn('qux.so_OBJS := qux1.o', lines)
-+
-     def test_jar_manifests(self):
-         env = self._consume('jar-manifests', RecursiveMakeBackend)
- 
-         with open(os.path.join(env.topobjdir, 'backend.mk'), 'rb') as fh:
-             lines = fh.readlines()
- 
-         lines = [line.rstrip() for line in lines]
- 

+ 0 - 386
bug1240930-253/frg-mozilla/1429875-5-61a1.patch

@@ -1,386 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1521589452 25200
-# Node ID cd90d8ccc5be982afb1bab0a2f2a649e10491817
-# Parent  5197d3500da2bbf39a50d399f355a3bca4a59726
-Bug 1429875 - Implement OBJ_SUFFIX overriding for the profile generation phase on linux in mozbuild. r=glandium
-
-MozReview-Commit-ID: 8PtgxfbxuE
-
-diff --git a/config/config.mk b/config/config.mk
---- a/config/config.mk
-+++ b/config/config.mk
-@@ -425,25 +425,28 @@ endif
- 
- # MDDEPDIR is the subdirectory where dependency files are stored
- MDDEPDIR := .deps
- 
- # autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
- # this file
- OBJ_SUFFIX := $(_OBJ_SUFFIX)
- 
-+OBJS_VAR_SUFFIX := OBJS
-+
- # PGO builds with GCC build objects with instrumentation in a first pass,
- # then objects optimized, without instrumentation, in a second pass. If
- # we overwrite the objects from the first pass with those from the second,
- # we end up not getting instrumentation data for better optimization on
- # incremental builds. As a consequence, we use a different object suffix
- # for the first pass.
--ifndef NO_PROFILE_GUIDED_OPTIMIZE
- ifdef MOZ_PROFILE_GENERATE
- ifdef GNU_CC
-+OBJS_VAR_SUFFIX := PGO_OBJS
-+ifndef NO_PROFILE_GUIDED_OPTIMIZE
- OBJ_SUFFIX := i_o
- endif
- endif
- endif
- 
- PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply
- 
- export CL_INCLUDES_PREFIX
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -535,17 +535,17 @@ endif
- #
- # PROGRAM = Foo
- # creates OBJS, links with LIBS to create Foo
- #
- $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
- 	$(REPORT_BUILD)
- 	@$(RM) $@.manifest
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
- ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$(notdir $@).manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest and $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
- 		else \
- 			echo 'Embedding manifest from $@.manifest'; \
- 			$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
-@@ -556,17 +556,17 @@ ifdef MSMANIFEST_TOOL
- 	fi
- endif	# MSVC with manifest tool
- ifdef MOZ_PROFILE_GENERATE
- # touch it a few seconds into the future to work around FAT's
- # 2-second granularity
- 	touch -t `date +%Y%m%d%H%M.%S -d 'now+5seconds'` pgo.relink
- endif
- else # !WINNT || GNU_CC
--	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
- 	$(call py_action,check_binary,--target $@)
- endif # WINNT && !GNU_CC
- 
- ifdef ENABLE_STRIP
- 	$(STRIP) $(STRIP_FLAGS) $@
- endif
- ifdef MOZ_POST_PROGRAM_COMMAND
- 	$(MOZ_POST_PROGRAM_COMMAND) $@
-@@ -607,25 +607,25 @@ endif
- # Foo.o (from either Foo.c or Foo.cpp).
- #
- # SIMPLE_PROGRAMS = Foo Bar
- # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
- #
- $(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(LINKER) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(LINKER) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $($@_$(OBJS_VAR_SUFFIX)) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
- ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
- 		rm -f $@.manifest; \
- 	fi
- endif	# MSVC with manifest tool
- else
--	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_$(OBJS_VAR_SUFFIX)) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
- 	$(call py_action,check_binary,--target $@)
- endif # WINNT && !GNU_CC
- 
- ifdef ENABLE_STRIP
- 	$(STRIP) $(STRIP_FLAGS) $@
- endif
- ifdef MOZ_POST_PROGRAM_COMMAND
- 	$(MOZ_POST_PROGRAM_COMMAND) $@
-@@ -644,17 +644,17 @@ endif
- endif
- ifndef CROSS_COMPILE
- 	$(call py_action,check_binary,--host $@)
- endif
- 
- $(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- 	$(RM) $(REAL_LIBRARY)
--	$(AR) $(AR_FLAGS) $(OBJS) $($@_OBJS)
-+	$(AR) $(AR_FLAGS) $(OBJS) $($@_$(OBJS_VAR_SUFFIX))
- 
- ifeq ($(OS_ARCH),WINNT)
- # Import libraries are created by the rules creating shared libraries.
- # The rules to copy them to $(DIST)/lib depend on $(IMPORT_LIBRARY),
- # but make will happily consider the import library before it is refreshed
- # when rebuilding the corresponding shared library. Defining an empty recipe
- # for import libraries forces make to wait for the shared library recipe to
- # have run before considering other targets that depend on the import library.
-@@ -672,17 +672,17 @@ endif
- # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
- # so no need to conditionalize on OS version or debugging format.
- 
- $(SHARED_LIBRARY): $(OBJS) $(RESFILE) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- ifndef INCREMENTAL_LINKER
- 	$(RM) $@
- endif
--	$(MKSHLIB) $($@_OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
-+	$(MKSHLIB) $($@_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
- 	$(call py_action,check_binary,--target $@)
- 
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- ifdef MSMANIFEST_TOOL
- ifdef EMBED_MANIFEST_AT
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$@.manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$@.manifest and $@.manifest'; \
-diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py
---- a/python/mozbuild/mozbuild/backend/common.py
-+++ b/python/mozbuild/mozbuild/backend/common.py
-@@ -202,25 +202,31 @@ class CommonBackend(BuildBackend):
-             }
-             json.dump(d, fh, sort_keys=True, indent=4)
- 
-     def _expand_libs(self, input_bin):
-         os_libs = []
-         shared_libs = []
-         static_libs = []
-         objs = []
-+        no_pgo_objs = []
- 
-         seen_objs = set()
-         seen_libs = set()
- 
-         def add_objs(lib):
-             for o in lib.objs:
-                 if o not in seen_objs:
-                     seen_objs.add(o)
-                     objs.append(o)
-+                    # This is slightly odd, buf for consistency with the
-+                    # recursivemake backend we don't replace OBJ_SUFFIX if any
-+                    # object in a library has `no_pgo` set.
-+                    if lib.no_pgo_objs or lib.no_pgo:
-+                        no_pgo_objs.append(o)
- 
-         def expand(lib, recurse_objs, system_libs):
-             if isinstance(lib, StaticLibrary):
-                 if lib.no_expand_lib:
-                     static_libs.append(lib)
-                     recurse_objs = False
-                 elif recurse_objs:
-                     add_objs(lib)
-@@ -252,17 +258,17 @@ class CommonBackend(BuildBackend):
-                     seen_libs.add(lib)
-                     shared_libs.append(lib)
- 
-         for lib in input_bin.linked_system_libs:
-             if lib not in seen_libs:
-                 seen_libs.add(lib)
-                 os_libs.append(lib)
- 
--        return objs, shared_libs, os_libs, static_libs
-+        return objs, no_pgo_objs, shared_libs, os_libs, static_libs
- 
-     def _make_list_file(self, objdir, objs, name):
-         if not objs:
-             return None
-         list_style = self.environment.substs.get('EXPAND_LIBS_LIST_STYLE')
-         list_file_path = mozpath.join(objdir, name)
-         objs = [os.path.relpath(o, objdir) for o in objs]
-         if list_style == 'linkerscript':
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1290,43 +1290,78 @@ class RecursiveMakeBackend(CommonBackend
-         def pretty_relpath(lib):
-             return '$(DEPTH)/%s' % mozpath.relpath(lib.objdir, topobjdir)
- 
-         topobjdir = mozpath.normsep(obj.topobjdir)
-         # This will create the node even if there aren't any linked libraries.
-         build_target = self._build_target_for_obj(obj)
-         self._compile_graph[build_target]
- 
--        objs, shared_libs, os_libs, static_libs = self._expand_libs(obj)
-+        objs, no_pgo_objs, shared_libs, os_libs, static_libs = self._expand_libs(obj)
- 
-         if obj.KIND == 'target':
-             obj_target = obj.name
-             if isinstance(obj, Program):
-                 obj_target = self._pretty_path(obj.output_path, backend_file)
- 
-+            is_unit_test = isinstance(obj, BaseProgram) and obj.is_unit_test
-+            profile_gen_objs = []
-+
-+            if (self.environment.substs.get('MOZ_PGO') and
-+                self.environment.substs.get('GNU_CC')):
-+                # We use a different OBJ_SUFFIX for the profile generate phase on
-+                # linux. These get picked up via OBJS_VAR_SUFFIX in config.mk.
-+                if not is_unit_test and not isinstance(obj, SimpleProgram):
-+                    profile_gen_objs = [o if o in no_pgo_objs else '%s.%s' %
-+                                        (mozpath.splitext(o)[0], 'i_o') for o in objs]
-+
-+            def write_obj_deps(target, objs_ref, pgo_objs_ref):
-+                if pgo_objs_ref:
-+                    backend_file.write('ifdef MOZ_PROFILE_GENERATE\n')
-+                    backend_file.write('%s: %s\n' % (target, pgo_objs_ref))
-+                    backend_file.write('else\n')
-+                    backend_file.write('%s: %s\n' % (target, objs_ref))
-+                    backend_file.write('endif\n')
-+                else:
-+                    backend_file.write('%s: %s\n' % (target, objs_ref))
-+
-             objs_ref = ' \\\n    '.join(os.path.relpath(o, obj.objdir)
-                                         for o in objs)
-+            pgo_objs_ref = ' \\\n    '.join(os.path.relpath(o, obj.objdir)
-+                                            for o in profile_gen_objs)
-             # Don't bother with a list file if we're only linking objects built
-             # in this directory or building a real static library. This
-             # accommodates clang-plugin, where we would otherwise pass an
-             # incorrect list file format to the host compiler as well as when
-             # creating an archive with AR, which doesn't understand list files.
-             if (objs == obj.objs and not isinstance(obj, StaticLibrary) or
--                isinstance(obj, StaticLibrary) and obj.no_expand_lib):
--                backend_file.write_once('%s_OBJS := %s\n' %
--                                        (obj.name, objs_ref))
--                backend_file.write_once('%s: %s\n' % (obj_target, objs_ref))
-+              isinstance(obj, StaticLibrary) and obj.no_expand_lib):
-+                backend_file.write_once('%s_OBJS := %s\n' % (obj.name,
-+                                                             objs_ref))
-+                if profile_gen_objs:
-+                    backend_file.write_once('%s_PGO_OBJS := %s\n' % (obj.name,
-+                                                                     pgo_objs_ref))
-+                write_obj_deps(obj_target, objs_ref, pgo_objs_ref)
-             elif not isinstance(obj, StaticLibrary):
-                 list_file_path = '%s.list' % obj.name.replace('.', '_')
-                 list_file_ref = self._make_list_file(obj.objdir, objs,
-                                                      list_file_path)
-                 backend_file.write_once('%s_OBJS := %s\n' %
-                                         (obj.name, list_file_ref))
-                 backend_file.write_once('%s: %s\n' % (obj_target, list_file_path))
--                backend_file.write_once('%s: %s\n' % (obj_target, objs_ref))
-+                if profile_gen_objs:
-+                    pgo_list_file_path = '%s_pgo.list' % obj.name.replace('.', '_')
-+                    pgo_list_file_ref = self._make_list_file(obj.objdir,
-+                                                             profile_gen_objs,
-+                                                             pgo_list_file_path)
-+                    backend_file.write_once('%s_PGO_OBJS := %s\n' %
-+                                            (obj.name, pgo_list_file_ref))
-+                    backend_file.write_once('%s: %s\n' % (obj_target,
-+                                                          pgo_list_file_path))
-+                write_obj_deps(obj_target, objs_ref, pgo_objs_ref)
- 
-         for lib in shared_libs:
-             backend_file.write_once('SHARED_LIBS += %s/%s\n' %
-                                     (pretty_relpath(lib), lib.import_name))
-         for lib in static_libs:
-             backend_file.write_once('STATIC_LIBS += %s/%s\n' %
-                                     (pretty_relpath(lib), lib.import_name))
-         for lib in os_libs:
-diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py
---- a/python/mozbuild/mozbuild/frontend/data.py
-+++ b/python/mozbuild/mozbuild/frontend/data.py
-@@ -383,26 +383,30 @@ class LinkageMultipleRustLibrariesError(
- 
- class Linkable(ContextDerived):
-     """Generic context derived container object for programs and libraries"""
-     __slots__ = (
-         'cxx_link',
-         'lib_defines',
-         'linked_libraries',
-         'linked_system_libs',
-+        'no_pgo_sources',
-+        'no_pgo',
-         'sources',
-     )
- 
-     def __init__(self, context):
-         ContextDerived.__init__(self, context)
-         self.cxx_link = False
-         self.linked_libraries = []
-         self.linked_system_libs = []
-         self.lib_defines = Defines(context, {})
-         self.sources = defaultdict(list)
-+        self.no_pgo_sources = []
-+        self.no_pgo = False
- 
-     def link_library(self, obj):
-         assert isinstance(obj, BaseLibrary)
-         if obj.KIND != self.KIND:
-             raise LinkageWrongKindError('%s != %s' % (obj.KIND, self.KIND))
-         # Linking multiple Rust libraries into an object would result in
-         # multiple copies of the Rust standard library, as well as linking
-         # errors from duplicate symbols.
-@@ -432,26 +436,33 @@ class Linkable(ContextDerived):
-     def source_files(self):
-         all_sources = []
-         # This is ordered for reproducibility and consistently w/
-         # config/rules.mk
-         for suffix in ('.c', '.S', '.cpp', '.m', '.mm', '.s'):
-             all_sources += self.sources.get(suffix, [])
-         return all_sources
- 
--    @property
--    def objs(self):
-+    def _get_objs(self, sources):
-         obj_prefix = ''
-         if self.KIND == 'host':
-             obj_prefix = 'host_'
- 
-         return [mozpath.join(self.objdir, '%s%s.%s' % (obj_prefix,
-                                                        mozpath.splitext(mozpath.basename(f))[0],
-                                                        self.config.substs.get('OBJ_SUFFIX', '')))
--                for f in self.source_files()]
-+                for f in sources]
-+
-+    @property
-+    def no_pgo_objs(self):
-+        return self._get_objs(self.no_pgo_sources)
-+
-+    @property
-+    def objs(self):
-+        return self._get_objs(self.source_files())
- 
- 
- class BaseProgram(Linkable):
-     """Context derived container object for programs, which is a unicode
-     string.
- 
-     This class handles automatically appending a binary suffix to the program
-     name.
-diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
---- a/python/mozbuild/mozbuild/frontend/emitter.py
-+++ b/python/mozbuild/mozbuild/frontend/emitter.py
-@@ -984,16 +984,20 @@ class TreeMetadataEmitter(LoggingMixin):
-                     ctxt_sources[variable][canonical_suffix] += sorted(srcs)
-                     yield obj
- 
-         if ctxt_sources:
-             for linkable in linkables:
-                 for target_var in ('SOURCES', 'UNIFIED_SOURCES'):
-                     for suffix, srcs in ctxt_sources[target_var].items():
-                         linkable.sources[suffix] += srcs
-+                if no_pgo_sources:
-+                    linkable.no_pgo_sources = no_pgo_sources
-+                elif no_pgo:
-+                    linkable.no_pgo = True
-             for host_linkable in host_linkables:
-                 for suffix, srcs in ctxt_sources['HOST_SOURCES'].items():
-                     host_linkable.sources[suffix] += srcs
- 
-         for f, flags in all_flags.iteritems():
-             if flags.flags:
-                 ext = mozpath.splitext(f)[1]
-                 yield PerSourceFlag(context, f, flags.flags)

+ 0 - 1565
bug1240930-253/frg-mozilla/1437942-62a1.patch

@@ -1,1565 +0,0 @@
-# HG changeset patch
-# User Michael Kaply <mozilla@kaply.com>
-# Date 1528148750 18000
-# Node ID 67f15f4455067ee2d85245e5482d7241880911a1
-# Parent  bf962e0c8abe9f80d8e20a51a62667b2977d903b
-Bug 1437942 - Remove search engines from langpacks. r=adw
-
-MozReview-Commit-ID: GFCIbfmCc5B
-
-diff --git a/browser/base/content/test/static/browser_all_files_referenced.js b/browser/base/content/test/static/browser_all_files_referenced.js
---- a/browser/base/content/test/static/browser_all_files_referenced.js
-+++ b/browser/base/content/test/static/browser_all_files_referenced.js
-@@ -7,17 +7,16 @@
- 
- // Slow on asan builds.
- requestLongerTimeout(5);
- 
- var isDevtools = SimpleTest.harnessParameters.subsuite == "devtools";
- 
- var gExceptionPaths = [
-   "chrome://browser/content/defaultthemes/",
--  "chrome://browser/locale/searchplugins/",
-   "resource://app/defaults/blocklists/",
-   "resource://app/defaults/pinning/",
-   "resource://app/defaults/preferences/",
-   "resource://gre/modules/commonjs/",
-   "resource://gre/defaults/pref/",
- 
-   // These resources are referenced using relative paths from html files.
-   "resource://payments/",
-@@ -30,16 +29,19 @@ var gExceptionPaths = [
-   "resource://activity-stream/prerendered/",
- 
-   // browser/extensions/pdfjs/content/build/pdf.js#1999
-   "resource://pdf.js/web/images/",
- 
-   // Exclude all the metadata paths under the country metadata folder because these
-   // paths will be concatenated in FormAutofillUtils.jsm based on different country/region.
-   "resource://formautofill/addressmetadata/",
-+
-+  // Exclude all search-plugins because they aren't referenced by filename
-+  "resource://search-plugins/",
- ];
- 
- // These are not part of the omni.ja file, so we find them only when running
- // the test on a non-packaged build.
- if (AppConstants.platform == "macosx")
-   gExceptionPaths.push("resource://gre/res/cursors/");
- 
- var whitelist = [
-diff --git a/browser/base/jar.mn b/browser/base/jar.mn
---- a/browser/base/jar.mn
-+++ b/browser/base/jar.mn
-@@ -137,9 +137,8 @@ browser.jar:
-         content/browser/blockedSite.xhtml               (content/blockedSite.xhtml)
- 
- % override chrome://global/content/netError.xhtml chrome://browser/content/aboutNetError.xhtml
- 
- # L10n resources and overrides.
- % override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
- % override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
- % override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
--% resource search-plugins chrome://browser/locale/searchplugins/
-diff --git a/browser/components/search/content/search.xml b/browser/components/search/content/search.xml
---- a/browser/components/search/content/search.xml
-+++ b/browser/components/search/content/search.xml
-@@ -66,16 +66,17 @@
-     </content>
- 
-     <implementation implements="nsIObserver">
-       <constructor><![CDATA[
-         if (this.parentNode.parentNode.localName == "toolbarpaletteitem")
-           return;
- 
-         Services.obs.addObserver(this, "browser-search-engine-modified");
-+        Services.obs.addObserver(this, "browser-search-service");
- 
-         this._initialized = true;
- 
-         (window.delayedStartupPromise || Promise.resolve()).then(() => {
-           window.requestIdleCallback(() => {
-             Services.search.init(aStatus => {
-               // Bail out if the binding's been destroyed
-               if (!this._initialized)
-@@ -113,16 +114,17 @@
-       ]]></destructor>
- 
-       <method name="destroy">
-         <body><![CDATA[
-         if (this._initialized) {
-           this._initialized = false;
- 
-           Services.obs.removeObserver(this, "browser-search-engine-modified");
-+          Services.obs.removeObserver(this, "browser-search-service");
-         }
- 
-         // Make sure to break the cycle from _textbox to us. Otherwise we leak
-         // the world. But make sure it's actually pointing to us.
-         // Also make sure the textbox has ever been constructed, otherwise the
-         // _textbox getter will cause the textbox constructor to run, add an
-         // observer, and leak the world too.
-         if (this._textboxInitialized && this._textbox.mController.input == this)
-@@ -182,17 +184,18 @@
-         ]]></body>
-       </method>
- 
-       <method name="observe">
-         <parameter name="aEngine"/>
-         <parameter name="aTopic"/>
-         <parameter name="aVerb"/>
-         <body><![CDATA[
--          if (aTopic == "browser-search-engine-modified") {
-+          if (aTopic == "browser-search-engine-modified" ||
-+              (aTopic == "browser-search-service" && aVerb == "init-complete")) {
-             switch (aVerb) {
-             case "engine-removed":
-               this.offerNewEngine(aEngine);
-               break;
-             case "engine-added":
-               this.hideNewEngine(aEngine);
-               break;
-             case "engine-changed":
-@@ -1377,16 +1380,17 @@
-         menu.addEventListener("popuphidden", aEvent => {
-           this._ignoreMouseEvents = false;
-           aEvent.stopPropagation();
-         });
- 
-         // Add weak referenced observers to invalidate our cached list of engines.
-         Services.prefs.addObserver("browser.search.hiddenOneOffs", this, true);
-         Services.obs.addObserver(this, "browser-search-engine-modified", true);
-+        Services.obs.addObserver(this, "browser-search-service", true);
- 
-         // Rebuild the buttons when the theme changes.  See bug 1357800 for
-         // details.  Summary: On Linux, switching between themes can cause a row
-         // of buttons to disappear.
-         Services.obs.addObserver(this, "lightweight-theme-changed", true);
-       ]]></constructor>
- 
-       <!-- This handles events outside the one-off buttons, like on the popup
-diff --git a/browser/components/search/jar.mn b/browser/components/search/jar.mn
---- a/browser/components/search/jar.mn
-+++ b/browser/components/search/jar.mn
-@@ -2,8 +2,12 @@
- # 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/.
- 
- browser.jar:
-         content/browser/search/search.xml                           (content/search.xml)
-         content/browser/search/searchbarBindings.css                (content/searchbarBindings.css)
-         content/browser/search/searchReset.xhtml                    (content/searchReset.xhtml)
-         content/browser/search/searchReset.js                       (content/searchReset.js)
-+
-+        searchplugins/                                              (searchplugins/**)
-+
-+% resource search-plugins %searchplugins/
-diff --git a/browser/locales/searchplugins/allaannonser-sv-SE.xml b/browser/components/search/searchplugins/allaannonser-sv-SE.xml
-rename from browser/locales/searchplugins/allaannonser-sv-SE.xml
-rename to browser/components/search/searchplugins/allaannonser-sv-SE.xml
-diff --git a/browser/locales/searchplugins/allegro-pl.xml b/browser/components/search/searchplugins/allegro-pl.xml
-rename from browser/locales/searchplugins/allegro-pl.xml
-rename to browser/components/search/searchplugins/allegro-pl.xml
-diff --git a/browser/locales/searchplugins/amazon-au.xml b/browser/components/search/searchplugins/amazon-au.xml
-rename from browser/locales/searchplugins/amazon-au.xml
-rename to browser/components/search/searchplugins/amazon-au.xml
-diff --git a/browser/locales/searchplugins/amazon-br.xml b/browser/components/search/searchplugins/amazon-br.xml
-rename from browser/locales/searchplugins/amazon-br.xml
-rename to browser/components/search/searchplugins/amazon-br.xml
-diff --git a/browser/locales/searchplugins/amazon-ca.xml b/browser/components/search/searchplugins/amazon-ca.xml
-rename from browser/locales/searchplugins/amazon-ca.xml
-rename to browser/components/search/searchplugins/amazon-ca.xml
-diff --git a/browser/locales/searchplugins/amazon-en-GB.xml b/browser/components/search/searchplugins/amazon-en-GB.xml
-rename from browser/locales/searchplugins/amazon-en-GB.xml
-rename to browser/components/search/searchplugins/amazon-en-GB.xml
-diff --git a/browser/locales/searchplugins/amazon-france.xml b/browser/components/search/searchplugins/amazon-france.xml
-rename from browser/locales/searchplugins/amazon-france.xml
-rename to browser/components/search/searchplugins/amazon-france.xml
-diff --git a/browser/locales/searchplugins/amazon-in.xml b/browser/components/search/searchplugins/amazon-in.xml
-rename from browser/locales/searchplugins/amazon-in.xml
-rename to browser/components/search/searchplugins/amazon-in.xml
-diff --git a/browser/locales/searchplugins/amazon-it.xml b/browser/components/search/searchplugins/amazon-it.xml
-rename from browser/locales/searchplugins/amazon-it.xml
-rename to browser/components/search/searchplugins/amazon-it.xml
-diff --git a/browser/locales/searchplugins/amazon-jp.xml b/browser/components/search/searchplugins/amazon-jp.xml
-rename from browser/locales/searchplugins/amazon-jp.xml
-rename to browser/components/search/searchplugins/amazon-jp.xml
-diff --git a/browser/locales/searchplugins/amazon-mx.xml b/browser/components/search/searchplugins/amazon-mx.xml
-rename from browser/locales/searchplugins/amazon-mx.xml
-rename to browser/components/search/searchplugins/amazon-mx.xml
-diff --git a/browser/locales/searchplugins/amazon-nl.xml b/browser/components/search/searchplugins/amazon-nl.xml
-rename from browser/locales/searchplugins/amazon-nl.xml
-rename to browser/components/search/searchplugins/amazon-nl.xml
-diff --git a/browser/locales/searchplugins/amazondotcn.xml b/browser/components/search/searchplugins/amazondotcn.xml
-rename from browser/locales/searchplugins/amazondotcn.xml
-rename to browser/components/search/searchplugins/amazondotcn.xml
-diff --git a/browser/locales/searchplugins/amazondotcom-de.xml b/browser/components/search/searchplugins/amazondotcom-de.xml
-rename from browser/locales/searchplugins/amazondotcom-de.xml
-rename to browser/components/search/searchplugins/amazondotcom-de.xml
-diff --git a/browser/locales/searchplugins/amazondotcom.xml b/browser/components/search/searchplugins/amazondotcom.xml
-rename from browser/locales/searchplugins/amazondotcom.xml
-rename to browser/components/search/searchplugins/amazondotcom.xml
-diff --git a/browser/locales/searchplugins/atlas-sk.xml b/browser/components/search/searchplugins/atlas-sk.xml
-rename from browser/locales/searchplugins/atlas-sk.xml
-rename to browser/components/search/searchplugins/atlas-sk.xml
-diff --git a/browser/locales/searchplugins/azerdict.xml b/browser/components/search/searchplugins/azerdict.xml
-rename from browser/locales/searchplugins/azerdict.xml
-rename to browser/components/search/searchplugins/azerdict.xml
-diff --git a/browser/locales/searchplugins/azet-sk.xml b/browser/components/search/searchplugins/azet-sk.xml
-rename from browser/locales/searchplugins/azet-sk.xml
-rename to browser/components/search/searchplugins/azet-sk.xml
-diff --git a/browser/locales/searchplugins/baidu.xml b/browser/components/search/searchplugins/baidu.xml
-rename from browser/locales/searchplugins/baidu.xml
-rename to browser/components/search/searchplugins/baidu.xml
-diff --git a/browser/locales/searchplugins/bbc-alba.xml b/browser/components/search/searchplugins/bbc-alba.xml
-rename from browser/locales/searchplugins/bbc-alba.xml
-rename to browser/components/search/searchplugins/bbc-alba.xml
-diff --git a/browser/locales/searchplugins/bing.xml b/browser/components/search/searchplugins/bing.xml
-rename from browser/locales/searchplugins/bing.xml
-rename to browser/components/search/searchplugins/bing.xml
-diff --git a/browser/locales/searchplugins/bok-NO.xml b/browser/components/search/searchplugins/bok-NO.xml
-rename from browser/locales/searchplugins/bok-NO.xml
-rename to browser/components/search/searchplugins/bok-NO.xml
-diff --git a/browser/locales/searchplugins/bolcom-fy-NL.xml b/browser/components/search/searchplugins/bolcom-fy-NL.xml
-rename from browser/locales/searchplugins/bolcom-fy-NL.xml
-rename to browser/components/search/searchplugins/bolcom-fy-NL.xml
-diff --git a/browser/locales/searchplugins/bolcom-nl.xml b/browser/components/search/searchplugins/bolcom-nl.xml
-rename from browser/locales/searchplugins/bolcom-nl.xml
-rename to browser/components/search/searchplugins/bolcom-nl.xml
-diff --git a/browser/locales/searchplugins/bookplus-fi.xml b/browser/components/search/searchplugins/bookplus-fi.xml
-rename from browser/locales/searchplugins/bookplus-fi.xml
-rename to browser/components/search/searchplugins/bookplus-fi.xml
-diff --git a/browser/locales/searchplugins/buscape.xml b/browser/components/search/searchplugins/buscape.xml
-rename from browser/locales/searchplugins/buscape.xml
-rename to browser/components/search/searchplugins/buscape.xml
-diff --git a/browser/locales/searchplugins/ceneji.xml b/browser/components/search/searchplugins/ceneji.xml
-rename from browser/locales/searchplugins/ceneji.xml
-rename to browser/components/search/searchplugins/ceneji.xml
-diff --git a/browser/locales/searchplugins/chambers-en-GB.xml b/browser/components/search/searchplugins/chambers-en-GB.xml
-rename from browser/locales/searchplugins/chambers-en-GB.xml
-rename to browser/components/search/searchplugins/chambers-en-GB.xml
-diff --git a/browser/locales/searchplugins/cnrtl-tlfi-fr.xml b/browser/components/search/searchplugins/cnrtl-tlfi-fr.xml
-rename from browser/locales/searchplugins/cnrtl-tlfi-fr.xml
-rename to browser/components/search/searchplugins/cnrtl-tlfi-fr.xml
-diff --git a/browser/locales/searchplugins/coccoc.xml b/browser/components/search/searchplugins/coccoc.xml
-rename from browser/locales/searchplugins/coccoc.xml
-rename to browser/components/search/searchplugins/coccoc.xml
-diff --git a/browser/locales/searchplugins/danawa-kr.xml b/browser/components/search/searchplugins/danawa-kr.xml
-rename from browser/locales/searchplugins/danawa-kr.xml
-rename to browser/components/search/searchplugins/danawa-kr.xml
-diff --git a/browser/locales/searchplugins/daum-kr.xml b/browser/components/search/searchplugins/daum-kr.xml
-rename from browser/locales/searchplugins/daum-kr.xml
-rename to browser/components/search/searchplugins/daum-kr.xml
-diff --git a/browser/locales/searchplugins/ddg.xml b/browser/components/search/searchplugins/ddg.xml
-rename from browser/locales/searchplugins/ddg.xml
-rename to browser/components/search/searchplugins/ddg.xml
-diff --git a/browser/locales/searchplugins/diccionariu-alla.xml b/browser/components/search/searchplugins/diccionariu-alla.xml
-rename from browser/locales/searchplugins/diccionariu-alla.xml
-rename to browser/components/search/searchplugins/diccionariu-alla.xml
-diff --git a/browser/locales/searchplugins/dict-enlv.xml b/browser/components/search/searchplugins/dict-enlv.xml
-rename from browser/locales/searchplugins/dict-enlv.xml
-rename to browser/components/search/searchplugins/dict-enlv.xml
-diff --git a/browser/locales/searchplugins/diec2.xml b/browser/components/search/searchplugins/diec2.xml
-rename from browser/locales/searchplugins/diec2.xml
-rename to browser/components/search/searchplugins/diec2.xml
-diff --git a/browser/locales/searchplugins/drae.xml b/browser/components/search/searchplugins/drae.xml
-rename from browser/locales/searchplugins/drae.xml
-rename to browser/components/search/searchplugins/drae.xml
-diff --git a/browser/locales/searchplugins/ebay-at.xml b/browser/components/search/searchplugins/ebay-at.xml
-rename from browser/locales/searchplugins/ebay-at.xml
-rename to browser/components/search/searchplugins/ebay-at.xml
-diff --git a/browser/locales/searchplugins/ebay-au.xml b/browser/components/search/searchplugins/ebay-au.xml
-rename from browser/locales/searchplugins/ebay-au.xml
-rename to browser/components/search/searchplugins/ebay-au.xml
-diff --git a/browser/locales/searchplugins/ebay-be.xml b/browser/components/search/searchplugins/ebay-be.xml
-rename from browser/locales/searchplugins/ebay-be.xml
-rename to browser/components/search/searchplugins/ebay-be.xml
-diff --git a/browser/locales/searchplugins/ebay-ca.xml b/browser/components/search/searchplugins/ebay-ca.xml
-rename from browser/locales/searchplugins/ebay-ca.xml
-rename to browser/components/search/searchplugins/ebay-ca.xml
-diff --git a/browser/locales/searchplugins/ebay-ch.xml b/browser/components/search/searchplugins/ebay-ch.xml
-rename from browser/locales/searchplugins/ebay-ch.xml
-rename to browser/components/search/searchplugins/ebay-ch.xml
-diff --git a/browser/locales/searchplugins/ebay-de.xml b/browser/components/search/searchplugins/ebay-de.xml
-rename from browser/locales/searchplugins/ebay-de.xml
-rename to browser/components/search/searchplugins/ebay-de.xml
-diff --git a/browser/locales/searchplugins/ebay-es.xml b/browser/components/search/searchplugins/ebay-es.xml
-rename from browser/locales/searchplugins/ebay-es.xml
-rename to browser/components/search/searchplugins/ebay-es.xml
-diff --git a/browser/locales/searchplugins/ebay-fr.xml b/browser/components/search/searchplugins/ebay-fr.xml
-rename from browser/locales/searchplugins/ebay-fr.xml
-rename to browser/components/search/searchplugins/ebay-fr.xml
-diff --git a/browser/locales/searchplugins/ebay-ie.xml b/browser/components/search/searchplugins/ebay-ie.xml
-rename from browser/locales/searchplugins/ebay-ie.xml
-rename to browser/components/search/searchplugins/ebay-ie.xml
-diff --git a/browser/locales/searchplugins/ebay-it.xml b/browser/components/search/searchplugins/ebay-it.xml
-rename from browser/locales/searchplugins/ebay-it.xml
-rename to browser/components/search/searchplugins/ebay-it.xml
-diff --git a/browser/locales/searchplugins/ebay-nl.xml b/browser/components/search/searchplugins/ebay-nl.xml
-rename from browser/locales/searchplugins/ebay-nl.xml
-rename to browser/components/search/searchplugins/ebay-nl.xml
-diff --git a/browser/locales/searchplugins/ebay-uk.xml b/browser/components/search/searchplugins/ebay-uk.xml
-rename from browser/locales/searchplugins/ebay-uk.xml
-rename to browser/components/search/searchplugins/ebay-uk.xml
-diff --git a/browser/locales/searchplugins/ebay.xml b/browser/components/search/searchplugins/ebay.xml
-rename from browser/locales/searchplugins/ebay.xml
-rename to browser/components/search/searchplugins/ebay.xml
-diff --git a/browser/locales/searchplugins/ecosia.xml b/browser/components/search/searchplugins/ecosia.xml
-rename from browser/locales/searchplugins/ecosia.xml
-rename to browser/components/search/searchplugins/ecosia.xml
-diff --git a/browser/locales/searchplugins/eki-ee.xml b/browser/components/search/searchplugins/eki-ee.xml
-rename from browser/locales/searchplugins/eki-ee.xml
-rename to browser/components/search/searchplugins/eki-ee.xml
-diff --git a/browser/locales/searchplugins/elebila.xml b/browser/components/search/searchplugins/elebila.xml
-rename from browser/locales/searchplugins/elebila.xml
-rename to browser/components/search/searchplugins/elebila.xml
-diff --git a/browser/locales/searchplugins/eudict.xml b/browser/components/search/searchplugins/eudict.xml
-rename from browser/locales/searchplugins/eudict.xml
-rename to browser/components/search/searchplugins/eudict.xml
-diff --git a/browser/locales/searchplugins/faclair-beag.xml b/browser/components/search/searchplugins/faclair-beag.xml
-rename from browser/locales/searchplugins/faclair-beag.xml
-rename to browser/components/search/searchplugins/faclair-beag.xml
-diff --git a/browser/locales/searchplugins/flip.xml b/browser/components/search/searchplugins/flip.xml
-rename from browser/locales/searchplugins/flip.xml
-rename to browser/components/search/searchplugins/flip.xml
-diff --git a/browser/locales/searchplugins/freelang.xml b/browser/components/search/searchplugins/freelang.xml
-rename from browser/locales/searchplugins/freelang.xml
-rename to browser/components/search/searchplugins/freelang.xml
-diff --git a/browser/locales/searchplugins/google-2018.xml b/browser/components/search/searchplugins/google-2018.xml
-rename from browser/locales/searchplugins/google-2018.xml
-rename to browser/components/search/searchplugins/google-2018.xml
-diff --git a/browser/locales/searchplugins/google-b-1-d.xml b/browser/components/search/searchplugins/google-b-1-d.xml
-rename from browser/locales/searchplugins/google-b-1-d.xml
-rename to browser/components/search/searchplugins/google-b-1-d.xml
-diff --git a/browser/locales/searchplugins/google-b-1-e.xml b/browser/components/search/searchplugins/google-b-1-e.xml
-rename from browser/locales/searchplugins/google-b-1-e.xml
-rename to browser/components/search/searchplugins/google-b-1-e.xml
-diff --git a/browser/locales/searchplugins/google-b-d.xml b/browser/components/search/searchplugins/google-b-d.xml
-rename from browser/locales/searchplugins/google-b-d.xml
-rename to browser/components/search/searchplugins/google-b-d.xml
-diff --git a/browser/locales/searchplugins/google-b-e.xml b/browser/components/search/searchplugins/google-b-e.xml
-rename from browser/locales/searchplugins/google-b-e.xml
-rename to browser/components/search/searchplugins/google-b-e.xml
-diff --git a/browser/locales/searchplugins/google-nocodes.xml b/browser/components/search/searchplugins/google-nocodes.xml
-rename from browser/locales/searchplugins/google-nocodes.xml
-rename to browser/components/search/searchplugins/google-nocodes.xml
-diff --git a/browser/locales/searchplugins/google.xml b/browser/components/search/searchplugins/google.xml
-rename from browser/locales/searchplugins/google.xml
-rename to browser/components/search/searchplugins/google.xml
-diff --git a/browser/locales/searchplugins/gujaratilexicon.xml b/browser/components/search/searchplugins/gujaratilexicon.xml
-rename from browser/locales/searchplugins/gujaratilexicon.xml
-rename to browser/components/search/searchplugins/gujaratilexicon.xml
-diff --git a/browser/locales/searchplugins/gulesider-NO.xml b/browser/components/search/searchplugins/gulesider-NO.xml
-rename from browser/locales/searchplugins/gulesider-NO.xml
-rename to browser/components/search/searchplugins/gulesider-NO.xml
-diff --git a/browser/locales/searchplugins/heureka-cz.xml b/browser/components/search/searchplugins/heureka-cz.xml
-rename from browser/locales/searchplugins/heureka-cz.xml
-rename to browser/components/search/searchplugins/heureka-cz.xml
-diff --git a/browser/locales/searchplugins/hoepli.xml b/browser/components/search/searchplugins/hoepli.xml
-rename from browser/locales/searchplugins/hoepli.xml
-rename to browser/components/search/searchplugins/hoepli.xml
-diff --git a/browser/locales/searchplugins/images/amazon.ico b/browser/components/search/searchplugins/images/amazon.ico
-rename from browser/locales/searchplugins/images/amazon.ico
-rename to browser/components/search/searchplugins/images/amazon.ico
-diff --git a/browser/locales/searchplugins/images/ebay.ico b/browser/components/search/searchplugins/images/ebay.ico
-rename from browser/locales/searchplugins/images/ebay.ico
-rename to browser/components/search/searchplugins/images/ebay.ico
-diff --git a/browser/locales/searchplugins/images/wikipedia.ico b/browser/components/search/searchplugins/images/wikipedia.ico
-rename from browser/locales/searchplugins/images/wikipedia.ico
-rename to browser/components/search/searchplugins/images/wikipedia.ico
-diff --git a/browser/locales/searchplugins/images/yandex-en.ico b/browser/components/search/searchplugins/images/yandex-en.ico
-rename from browser/locales/searchplugins/images/yandex-en.ico
-rename to browser/components/search/searchplugins/images/yandex-en.ico
-diff --git a/browser/locales/searchplugins/images/yandex-ru.ico b/browser/components/search/searchplugins/images/yandex-ru.ico
-rename from browser/locales/searchplugins/images/yandex-ru.ico
-rename to browser/components/search/searchplugins/images/yandex-ru.ico
-diff --git a/browser/locales/searchplugins/kannadastore.xml b/browser/components/search/searchplugins/kannadastore.xml
-rename from browser/locales/searchplugins/kannadastore.xml
-rename to browser/components/search/searchplugins/kannadastore.xml
-diff --git a/browser/locales/searchplugins/kaz-kk.xml b/browser/components/search/searchplugins/kaz-kk.xml
-rename from browser/locales/searchplugins/kaz-kk.xml
-rename to browser/components/search/searchplugins/kaz-kk.xml
-diff --git a/browser/locales/searchplugins/klask.xml b/browser/components/search/searchplugins/klask.xml
-rename from browser/locales/searchplugins/klask.xml
-rename to browser/components/search/searchplugins/klask.xml
-diff --git a/browser/locales/searchplugins/leit-is.xml b/browser/components/search/searchplugins/leit-is.xml
-rename from browser/locales/searchplugins/leit-is.xml
-rename to browser/components/search/searchplugins/leit-is.xml
-diff --git a/browser/locales/searchplugins/leo_ende_de-rm.xml b/browser/components/search/searchplugins/leo_ende_de-rm.xml
-rename from browser/locales/searchplugins/leo_ende_de-rm.xml
-rename to browser/components/search/searchplugins/leo_ende_de-rm.xml
-diff --git a/browser/locales/searchplugins/leo_ende_de.xml b/browser/components/search/searchplugins/leo_ende_de.xml
-rename from browser/locales/searchplugins/leo_ende_de.xml
-rename to browser/components/search/searchplugins/leo_ende_de.xml
-diff --git a/browser/locales/searchplugins/list-am.xml b/browser/components/search/searchplugins/list-am.xml
-rename from browser/locales/searchplugins/list-am.xml
-rename to browser/components/search/searchplugins/list-am.xml
-diff --git a/browser/locales/search/list.json b/browser/components/search/searchplugins/list.json
-rename from browser/locales/search/list.json
-rename to browser/components/search/searchplugins/list.json
---- a/browser/locales/search/list.json
-+++ b/browser/components/search/searchplugins/list.json
-@@ -440,17 +440,17 @@
-     },
-     "it": {
-       "default": {
-         "visibleDefaultEngines": [
-           "google-b-d", "bing", "amazon-it", "ddg", "ebay-it", "hoepli", "wikipedia-it"
-         ]
-       }
-     },
--    "ja-JP-mac": {
-+    "ja-JP-macos": {
-       "default": {
-         "searchOrder": ["Google", "Yahoo! JAPAN", "Bing", "Amazon.co.jp", "楽天市場", "ヤフオク!", "教えて!goo", "Twitter", "Wikipedia (ja)"],
-         "visibleDefaultEngines": [
-           "google-b-d", "yahoo-jp", "bing", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "twitter-ja", "wikipedia-ja", "ddg"
-         ]
-       }
-     },
-     "ja": {
-diff --git a/browser/locales/searchplugins/longdo.xml b/browser/components/search/searchplugins/longdo.xml
-rename from browser/locales/searchplugins/longdo.xml
-rename to browser/components/search/searchplugins/longdo.xml
-diff --git a/browser/locales/searchplugins/mailru.xml b/browser/components/search/searchplugins/mailru.xml
-rename from browser/locales/searchplugins/mailru.xml
-rename to browser/components/search/searchplugins/mailru.xml
-diff --git a/browser/locales/searchplugins/mapy-cz.xml b/browser/components/search/searchplugins/mapy-cz.xml
-rename from browser/locales/searchplugins/mapy-cz.xml
-rename to browser/components/search/searchplugins/mapy-cz.xml
-diff --git a/browser/locales/searchplugins/marktplaats-fy-NL.xml b/browser/components/search/searchplugins/marktplaats-fy-NL.xml
-rename from browser/locales/searchplugins/marktplaats-fy-NL.xml
-rename to browser/components/search/searchplugins/marktplaats-fy-NL.xml
-diff --git a/browser/locales/searchplugins/marktplaats-nl.xml b/browser/components/search/searchplugins/marktplaats-nl.xml
-rename from browser/locales/searchplugins/marktplaats-nl.xml
-rename to browser/components/search/searchplugins/marktplaats-nl.xml
-diff --git a/browser/locales/searchplugins/mercadolibre-ar.xml b/browser/components/search/searchplugins/mercadolibre-ar.xml
-rename from browser/locales/searchplugins/mercadolibre-ar.xml
-rename to browser/components/search/searchplugins/mercadolibre-ar.xml
-diff --git a/browser/locales/searchplugins/mercadolibre-cl.xml b/browser/components/search/searchplugins/mercadolibre-cl.xml
-rename from browser/locales/searchplugins/mercadolibre-cl.xml
-rename to browser/components/search/searchplugins/mercadolibre-cl.xml
-diff --git a/browser/locales/searchplugins/mercadolibre-mx.xml b/browser/components/search/searchplugins/mercadolibre-mx.xml
-rename from browser/locales/searchplugins/mercadolibre-mx.xml
-rename to browser/components/search/searchplugins/mercadolibre-mx.xml
-diff --git a/browser/locales/searchplugins/mercadolivre.xml b/browser/components/search/searchplugins/mercadolivre.xml
-rename from browser/locales/searchplugins/mercadolivre.xml
-rename to browser/components/search/searchplugins/mercadolivre.xml
-diff --git a/browser/locales/searchplugins/meta-ua.xml b/browser/components/search/searchplugins/meta-ua.xml
-rename from browser/locales/searchplugins/meta-ua.xml
-rename to browser/components/search/searchplugins/meta-ua.xml
-diff --git a/browser/locales/searchplugins/metamarket.xml b/browser/components/search/searchplugins/metamarket.xml
-rename from browser/locales/searchplugins/metamarket.xml
-rename to browser/components/search/searchplugins/metamarket.xml
-diff --git a/browser/locales/searchplugins/morfix-dic.xml b/browser/components/search/searchplugins/morfix-dic.xml
-rename from browser/locales/searchplugins/morfix-dic.xml
-rename to browser/components/search/searchplugins/morfix-dic.xml
-diff --git a/browser/locales/searchplugins/najdi-si.xml b/browser/components/search/searchplugins/najdi-si.xml
-rename from browser/locales/searchplugins/najdi-si.xml
-rename to browser/components/search/searchplugins/najdi-si.xml
-diff --git a/browser/locales/searchplugins/naver-kr.xml b/browser/components/search/searchplugins/naver-kr.xml
-rename from browser/locales/searchplugins/naver-kr.xml
-rename to browser/components/search/searchplugins/naver-kr.xml
-diff --git a/browser/locales/searchplugins/neti-ee.xml b/browser/components/search/searchplugins/neti-ee.xml
-rename from browser/locales/searchplugins/neti-ee.xml
-rename to browser/components/search/searchplugins/neti-ee.xml
-diff --git a/browser/locales/searchplugins/odpiralni.xml b/browser/components/search/searchplugins/odpiralni.xml
-rename from browser/locales/searchplugins/odpiralni.xml
-rename to browser/components/search/searchplugins/odpiralni.xml
-diff --git a/browser/locales/searchplugins/olx.xml b/browser/components/search/searchplugins/olx.xml
-rename from browser/locales/searchplugins/olx.xml
-rename to browser/components/search/searchplugins/olx.xml
-diff --git a/browser/locales/searchplugins/oshiete-goo.xml b/browser/components/search/searchplugins/oshiete-goo.xml
-rename from browser/locales/searchplugins/oshiete-goo.xml
-rename to browser/components/search/searchplugins/oshiete-goo.xml
-diff --git a/browser/locales/searchplugins/osta-ee.xml b/browser/components/search/searchplugins/osta-ee.xml
-rename from browser/locales/searchplugins/osta-ee.xml
-rename to browser/components/search/searchplugins/osta-ee.xml
-diff --git a/browser/locales/searchplugins/ozonru.xml b/browser/components/search/searchplugins/ozonru.xml
-rename from browser/locales/searchplugins/ozonru.xml
-rename to browser/components/search/searchplugins/ozonru.xml
-diff --git a/browser/locales/searchplugins/palasprint.xml b/browser/components/search/searchplugins/palasprint.xml
-rename from browser/locales/searchplugins/palasprint.xml
-rename to browser/components/search/searchplugins/palasprint.xml
-diff --git a/browser/locales/searchplugins/paroledigenova-lij.xml b/browser/components/search/searchplugins/paroledigenova-lij.xml
-rename from browser/locales/searchplugins/paroledigenova-lij.xml
-rename to browser/components/search/searchplugins/paroledigenova-lij.xml
-diff --git a/browser/locales/searchplugins/pledarigrond.xml b/browser/components/search/searchplugins/pledarigrond.xml
-rename from browser/locales/searchplugins/pledarigrond.xml
-rename to browser/components/search/searchplugins/pledarigrond.xml
-diff --git a/browser/locales/searchplugins/pogodak.xml b/browser/components/search/searchplugins/pogodak.xml
-rename from browser/locales/searchplugins/pogodak.xml
-rename to browser/components/search/searchplugins/pogodak.xml
-diff --git a/browser/locales/searchplugins/portalbgdict.xml b/browser/components/search/searchplugins/portalbgdict.xml
-rename from browser/locales/searchplugins/portalbgdict.xml
-rename to browser/components/search/searchplugins/portalbgdict.xml
-diff --git a/browser/locales/searchplugins/priberam.xml b/browser/components/search/searchplugins/priberam.xml
-rename from browser/locales/searchplugins/priberam.xml
-rename to browser/components/search/searchplugins/priberam.xml
-diff --git a/browser/locales/searchplugins/priceru.xml b/browser/components/search/searchplugins/priceru.xml
-rename from browser/locales/searchplugins/priceru.xml
-rename to browser/components/search/searchplugins/priceru.xml
-diff --git a/browser/locales/searchplugins/prisjakt-sv-SE.xml b/browser/components/search/searchplugins/prisjakt-sv-SE.xml
-rename from browser/locales/searchplugins/prisjakt-sv-SE.xml
-rename to browser/components/search/searchplugins/prisjakt-sv-SE.xml
-diff --git a/browser/locales/searchplugins/pwn-pl.xml b/browser/components/search/searchplugins/pwn-pl.xml
-rename from browser/locales/searchplugins/pwn-pl.xml
-rename to browser/components/search/searchplugins/pwn-pl.xml
-diff --git a/browser/locales/searchplugins/qwant.xml b/browser/components/search/searchplugins/qwant.xml
-rename from browser/locales/searchplugins/qwant.xml
-rename to browser/components/search/searchplugins/qwant.xml
-diff --git a/browser/locales/searchplugins/qxl-NO.xml b/browser/components/search/searchplugins/qxl-NO.xml
-rename from browser/locales/searchplugins/qxl-NO.xml
-rename to browser/components/search/searchplugins/qxl-NO.xml
-diff --git a/browser/locales/searchplugins/rakuten.xml b/browser/components/search/searchplugins/rakuten.xml
-rename from browser/locales/searchplugins/rakuten.xml
-rename to browser/components/search/searchplugins/rakuten.xml
-diff --git a/browser/locales/searchplugins/readmoo.xml b/browser/components/search/searchplugins/readmoo.xml
-rename from browser/locales/searchplugins/readmoo.xml
-rename to browser/components/search/searchplugins/readmoo.xml
-diff --git a/browser/locales/searchplugins/rediff.xml b/browser/components/search/searchplugins/rediff.xml
-rename from browser/locales/searchplugins/rediff.xml
-rename to browser/components/search/searchplugins/rediff.xml
-diff --git a/browser/locales/searchplugins/reta-vortaro.xml b/browser/components/search/searchplugins/reta-vortaro.xml
-rename from browser/locales/searchplugins/reta-vortaro.xml
-rename to browser/components/search/searchplugins/reta-vortaro.xml
-diff --git a/browser/locales/searchplugins/salidzinilv.xml b/browser/components/search/searchplugins/salidzinilv.xml
-rename from browser/locales/searchplugins/salidzinilv.xml
-rename to browser/components/search/searchplugins/salidzinilv.xml
-diff --git a/browser/locales/searchplugins/sapo.xml b/browser/components/search/searchplugins/sapo.xml
-rename from browser/locales/searchplugins/sapo.xml
-rename to browser/components/search/searchplugins/sapo.xml
-diff --git a/browser/locales/searchplugins/seznam-cz.xml b/browser/components/search/searchplugins/seznam-cz.xml
-rename from browser/locales/searchplugins/seznam-cz.xml
-rename to browser/components/search/searchplugins/seznam-cz.xml
-diff --git a/browser/locales/searchplugins/slovnik-sk.xml b/browser/components/search/searchplugins/slovnik-sk.xml
-rename from browser/locales/searchplugins/slovnik-sk.xml
-rename to browser/components/search/searchplugins/slovnik-sk.xml
-diff --git a/browser/locales/searchplugins/sslv.xml b/browser/components/search/searchplugins/sslv.xml
-rename from browser/locales/searchplugins/sslv.xml
-rename to browser/components/search/searchplugins/sslv.xml
-diff --git a/browser/locales/searchplugins/sztaki-en-hu.xml b/browser/components/search/searchplugins/sztaki-en-hu.xml
-rename from browser/locales/searchplugins/sztaki-en-hu.xml
-rename to browser/components/search/searchplugins/sztaki-en-hu.xml
-diff --git a/browser/locales/searchplugins/tearma.xml b/browser/components/search/searchplugins/tearma.xml
-rename from browser/locales/searchplugins/tearma.xml
-rename to browser/components/search/searchplugins/tearma.xml
-diff --git a/browser/locales/searchplugins/termau.xml b/browser/components/search/searchplugins/termau.xml
-rename from browser/locales/searchplugins/termau.xml
-rename to browser/components/search/searchplugins/termau.xml
-diff --git a/browser/locales/searchplugins/twitter-ja.xml b/browser/components/search/searchplugins/twitter-ja.xml
-rename from browser/locales/searchplugins/twitter-ja.xml
-rename to browser/components/search/searchplugins/twitter-ja.xml
-diff --git a/browser/locales/searchplugins/twitter.xml b/browser/components/search/searchplugins/twitter.xml
-rename from browser/locales/searchplugins/twitter.xml
-rename to browser/components/search/searchplugins/twitter.xml
-diff --git a/browser/locales/searchplugins/tyda-sv-SE.xml b/browser/components/search/searchplugins/tyda-sv-SE.xml
-rename from browser/locales/searchplugins/tyda-sv-SE.xml
-rename to browser/components/search/searchplugins/tyda-sv-SE.xml
-diff --git a/browser/locales/searchplugins/vatera.xml b/browser/components/search/searchplugins/vatera.xml
-rename from browser/locales/searchplugins/vatera.xml
-rename to browser/components/search/searchplugins/vatera.xml
-diff --git a/browser/locales/searchplugins/webdunia.xml b/browser/components/search/searchplugins/webdunia.xml
-rename from browser/locales/searchplugins/webdunia.xml
-rename to browser/components/search/searchplugins/webdunia.xml
-diff --git a/browser/locales/searchplugins/wikipedia-NN.xml b/browser/components/search/searchplugins/wikipedia-NN.xml
-rename from browser/locales/searchplugins/wikipedia-NN.xml
-rename to browser/components/search/searchplugins/wikipedia-NN.xml
-diff --git a/browser/locales/searchplugins/wikipedia-NO.xml b/browser/components/search/searchplugins/wikipedia-NO.xml
-rename from browser/locales/searchplugins/wikipedia-NO.xml
-rename to browser/components/search/searchplugins/wikipedia-NO.xml
-diff --git a/browser/locales/searchplugins/wikipedia-af.xml b/browser/components/search/searchplugins/wikipedia-af.xml
-rename from browser/locales/searchplugins/wikipedia-af.xml
-rename to browser/components/search/searchplugins/wikipedia-af.xml
-diff --git a/browser/locales/searchplugins/wikipedia-an.xml b/browser/components/search/searchplugins/wikipedia-an.xml
-rename from browser/locales/searchplugins/wikipedia-an.xml
-rename to browser/components/search/searchplugins/wikipedia-an.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ar.xml b/browser/components/search/searchplugins/wikipedia-ar.xml
-rename from browser/locales/searchplugins/wikipedia-ar.xml
-rename to browser/components/search/searchplugins/wikipedia-ar.xml
-diff --git a/browser/locales/searchplugins/wikipedia-as.xml b/browser/components/search/searchplugins/wikipedia-as.xml
-rename from browser/locales/searchplugins/wikipedia-as.xml
-rename to browser/components/search/searchplugins/wikipedia-as.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ast.xml b/browser/components/search/searchplugins/wikipedia-ast.xml
-rename from browser/locales/searchplugins/wikipedia-ast.xml
-rename to browser/components/search/searchplugins/wikipedia-ast.xml
-diff --git a/browser/locales/searchplugins/wikipedia-az.xml b/browser/components/search/searchplugins/wikipedia-az.xml
-rename from browser/locales/searchplugins/wikipedia-az.xml
-rename to browser/components/search/searchplugins/wikipedia-az.xml
-diff --git a/browser/locales/searchplugins/wikipedia-be-tarask.xml b/browser/components/search/searchplugins/wikipedia-be-tarask.xml
-rename from browser/locales/searchplugins/wikipedia-be-tarask.xml
-rename to browser/components/search/searchplugins/wikipedia-be-tarask.xml
-diff --git a/browser/locales/searchplugins/wikipedia-be.xml b/browser/components/search/searchplugins/wikipedia-be.xml
-rename from browser/locales/searchplugins/wikipedia-be.xml
-rename to browser/components/search/searchplugins/wikipedia-be.xml
-diff --git a/browser/locales/searchplugins/wikipedia-bg.xml b/browser/components/search/searchplugins/wikipedia-bg.xml
-rename from browser/locales/searchplugins/wikipedia-bg.xml
-rename to browser/components/search/searchplugins/wikipedia-bg.xml
-diff --git a/browser/locales/searchplugins/wikipedia-bn.xml b/browser/components/search/searchplugins/wikipedia-bn.xml
-rename from browser/locales/searchplugins/wikipedia-bn.xml
-rename to browser/components/search/searchplugins/wikipedia-bn.xml
-diff --git a/browser/locales/searchplugins/wikipedia-br.xml b/browser/components/search/searchplugins/wikipedia-br.xml
-rename from browser/locales/searchplugins/wikipedia-br.xml
-rename to browser/components/search/searchplugins/wikipedia-br.xml
-diff --git a/browser/locales/searchplugins/wikipedia-bs.xml b/browser/components/search/searchplugins/wikipedia-bs.xml
-rename from browser/locales/searchplugins/wikipedia-bs.xml
-rename to browser/components/search/searchplugins/wikipedia-bs.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ca.xml b/browser/components/search/searchplugins/wikipedia-ca.xml
-rename from browser/locales/searchplugins/wikipedia-ca.xml
-rename to browser/components/search/searchplugins/wikipedia-ca.xml
-diff --git a/browser/locales/searchplugins/wikipedia-cy.xml b/browser/components/search/searchplugins/wikipedia-cy.xml
-rename from browser/locales/searchplugins/wikipedia-cy.xml
-rename to browser/components/search/searchplugins/wikipedia-cy.xml
-diff --git a/browser/locales/searchplugins/wikipedia-cz.xml b/browser/components/search/searchplugins/wikipedia-cz.xml
-rename from browser/locales/searchplugins/wikipedia-cz.xml
-rename to browser/components/search/searchplugins/wikipedia-cz.xml
-diff --git a/browser/locales/searchplugins/wikipedia-da.xml b/browser/components/search/searchplugins/wikipedia-da.xml
-rename from browser/locales/searchplugins/wikipedia-da.xml
-rename to browser/components/search/searchplugins/wikipedia-da.xml
-diff --git a/browser/locales/searchplugins/wikipedia-de.xml b/browser/components/search/searchplugins/wikipedia-de.xml
-rename from browser/locales/searchplugins/wikipedia-de.xml
-rename to browser/components/search/searchplugins/wikipedia-de.xml
-diff --git a/browser/locales/searchplugins/wikipedia-dsb.xml b/browser/components/search/searchplugins/wikipedia-dsb.xml
-rename from browser/locales/searchplugins/wikipedia-dsb.xml
-rename to browser/components/search/searchplugins/wikipedia-dsb.xml
-diff --git a/browser/locales/searchplugins/wikipedia-el.xml b/browser/components/search/searchplugins/wikipedia-el.xml
-rename from browser/locales/searchplugins/wikipedia-el.xml
-rename to browser/components/search/searchplugins/wikipedia-el.xml
-diff --git a/browser/locales/searchplugins/wikipedia-eo.xml b/browser/components/search/searchplugins/wikipedia-eo.xml
-rename from browser/locales/searchplugins/wikipedia-eo.xml
-rename to browser/components/search/searchplugins/wikipedia-eo.xml
-diff --git a/browser/locales/searchplugins/wikipedia-es.xml b/browser/components/search/searchplugins/wikipedia-es.xml
-rename from browser/locales/searchplugins/wikipedia-es.xml
-rename to browser/components/search/searchplugins/wikipedia-es.xml
-diff --git a/browser/locales/searchplugins/wikipedia-et.xml b/browser/components/search/searchplugins/wikipedia-et.xml
-rename from browser/locales/searchplugins/wikipedia-et.xml
-rename to browser/components/search/searchplugins/wikipedia-et.xml
-diff --git a/browser/locales/searchplugins/wikipedia-eu.xml b/browser/components/search/searchplugins/wikipedia-eu.xml
-rename from browser/locales/searchplugins/wikipedia-eu.xml
-rename to browser/components/search/searchplugins/wikipedia-eu.xml
-diff --git a/browser/locales/searchplugins/wikipedia-fa.xml b/browser/components/search/searchplugins/wikipedia-fa.xml
-rename from browser/locales/searchplugins/wikipedia-fa.xml
-rename to browser/components/search/searchplugins/wikipedia-fa.xml
-diff --git a/browser/locales/searchplugins/wikipedia-fi.xml b/browser/components/search/searchplugins/wikipedia-fi.xml
-rename from browser/locales/searchplugins/wikipedia-fi.xml
-rename to browser/components/search/searchplugins/wikipedia-fi.xml
-diff --git a/browser/locales/searchplugins/wikipedia-fr.xml b/browser/components/search/searchplugins/wikipedia-fr.xml
-rename from browser/locales/searchplugins/wikipedia-fr.xml
-rename to browser/components/search/searchplugins/wikipedia-fr.xml
-diff --git a/browser/locales/searchplugins/wikipedia-fy-NL.xml b/browser/components/search/searchplugins/wikipedia-fy-NL.xml
-rename from browser/locales/searchplugins/wikipedia-fy-NL.xml
-rename to browser/components/search/searchplugins/wikipedia-fy-NL.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ga-IE.xml b/browser/components/search/searchplugins/wikipedia-ga-IE.xml
-rename from browser/locales/searchplugins/wikipedia-ga-IE.xml
-rename to browser/components/search/searchplugins/wikipedia-ga-IE.xml
-diff --git a/browser/locales/searchplugins/wikipedia-gd.xml b/browser/components/search/searchplugins/wikipedia-gd.xml
-rename from browser/locales/searchplugins/wikipedia-gd.xml
-rename to browser/components/search/searchplugins/wikipedia-gd.xml
-diff --git a/browser/locales/searchplugins/wikipedia-gl.xml b/browser/components/search/searchplugins/wikipedia-gl.xml
-rename from browser/locales/searchplugins/wikipedia-gl.xml
-rename to browser/components/search/searchplugins/wikipedia-gl.xml
-diff --git a/browser/locales/searchplugins/wikipedia-gn.xml b/browser/components/search/searchplugins/wikipedia-gn.xml
-rename from browser/locales/searchplugins/wikipedia-gn.xml
-rename to browser/components/search/searchplugins/wikipedia-gn.xml
-diff --git a/browser/locales/searchplugins/wikipedia-gu.xml b/browser/components/search/searchplugins/wikipedia-gu.xml
-rename from browser/locales/searchplugins/wikipedia-gu.xml
-rename to browser/components/search/searchplugins/wikipedia-gu.xml
-diff --git a/browser/locales/searchplugins/wikipedia-he.xml b/browser/components/search/searchplugins/wikipedia-he.xml
-rename from browser/locales/searchplugins/wikipedia-he.xml
-rename to browser/components/search/searchplugins/wikipedia-he.xml
-diff --git a/browser/locales/searchplugins/wikipedia-hi.xml b/browser/components/search/searchplugins/wikipedia-hi.xml
-rename from browser/locales/searchplugins/wikipedia-hi.xml
-rename to browser/components/search/searchplugins/wikipedia-hi.xml
-diff --git a/browser/locales/searchplugins/wikipedia-hr.xml b/browser/components/search/searchplugins/wikipedia-hr.xml
-rename from browser/locales/searchplugins/wikipedia-hr.xml
-rename to browser/components/search/searchplugins/wikipedia-hr.xml
-diff --git a/browser/locales/searchplugins/wikipedia-hsb.xml b/browser/components/search/searchplugins/wikipedia-hsb.xml
-rename from browser/locales/searchplugins/wikipedia-hsb.xml
-rename to browser/components/search/searchplugins/wikipedia-hsb.xml
-diff --git a/browser/locales/searchplugins/wikipedia-hu.xml b/browser/components/search/searchplugins/wikipedia-hu.xml
-rename from browser/locales/searchplugins/wikipedia-hu.xml
-rename to browser/components/search/searchplugins/wikipedia-hu.xml
-diff --git a/browser/locales/searchplugins/wikipedia-hy.xml b/browser/components/search/searchplugins/wikipedia-hy.xml
-rename from browser/locales/searchplugins/wikipedia-hy.xml
-rename to browser/components/search/searchplugins/wikipedia-hy.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ia.xml b/browser/components/search/searchplugins/wikipedia-ia.xml
-rename from browser/locales/searchplugins/wikipedia-ia.xml
-rename to browser/components/search/searchplugins/wikipedia-ia.xml
-diff --git a/browser/locales/searchplugins/wikipedia-id.xml b/browser/components/search/searchplugins/wikipedia-id.xml
-rename from browser/locales/searchplugins/wikipedia-id.xml
-rename to browser/components/search/searchplugins/wikipedia-id.xml
-diff --git a/browser/locales/searchplugins/wikipedia-is.xml b/browser/components/search/searchplugins/wikipedia-is.xml
-rename from browser/locales/searchplugins/wikipedia-is.xml
-rename to browser/components/search/searchplugins/wikipedia-is.xml
-diff --git a/browser/locales/searchplugins/wikipedia-it.xml b/browser/components/search/searchplugins/wikipedia-it.xml
-rename from browser/locales/searchplugins/wikipedia-it.xml
-rename to browser/components/search/searchplugins/wikipedia-it.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ja.xml b/browser/components/search/searchplugins/wikipedia-ja.xml
-rename from browser/locales/searchplugins/wikipedia-ja.xml
-rename to browser/components/search/searchplugins/wikipedia-ja.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ka.xml b/browser/components/search/searchplugins/wikipedia-ka.xml
-rename from browser/locales/searchplugins/wikipedia-ka.xml
-rename to browser/components/search/searchplugins/wikipedia-ka.xml
-diff --git a/browser/locales/searchplugins/wikipedia-kab.xml b/browser/components/search/searchplugins/wikipedia-kab.xml
-rename from browser/locales/searchplugins/wikipedia-kab.xml
-rename to browser/components/search/searchplugins/wikipedia-kab.xml
-diff --git a/browser/locales/searchplugins/wikipedia-kk.xml b/browser/components/search/searchplugins/wikipedia-kk.xml
-rename from browser/locales/searchplugins/wikipedia-kk.xml
-rename to browser/components/search/searchplugins/wikipedia-kk.xml
-diff --git a/browser/locales/searchplugins/wikipedia-km.xml b/browser/components/search/searchplugins/wikipedia-km.xml
-rename from browser/locales/searchplugins/wikipedia-km.xml
-rename to browser/components/search/searchplugins/wikipedia-km.xml
-diff --git a/browser/locales/searchplugins/wikipedia-kn.xml b/browser/components/search/searchplugins/wikipedia-kn.xml
-rename from browser/locales/searchplugins/wikipedia-kn.xml
-rename to browser/components/search/searchplugins/wikipedia-kn.xml
-diff --git a/browser/locales/searchplugins/wikipedia-kr.xml b/browser/components/search/searchplugins/wikipedia-kr.xml
-rename from browser/locales/searchplugins/wikipedia-kr.xml
-rename to browser/components/search/searchplugins/wikipedia-kr.xml
-diff --git a/browser/locales/searchplugins/wikipedia-lij.xml b/browser/components/search/searchplugins/wikipedia-lij.xml
-rename from browser/locales/searchplugins/wikipedia-lij.xml
-rename to browser/components/search/searchplugins/wikipedia-lij.xml
-diff --git a/browser/locales/searchplugins/wikipedia-lo.xml b/browser/components/search/searchplugins/wikipedia-lo.xml
-rename from browser/locales/searchplugins/wikipedia-lo.xml
-rename to browser/components/search/searchplugins/wikipedia-lo.xml
-diff --git a/browser/locales/searchplugins/wikipedia-lt.xml b/browser/components/search/searchplugins/wikipedia-lt.xml
-rename from browser/locales/searchplugins/wikipedia-lt.xml
-rename to browser/components/search/searchplugins/wikipedia-lt.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ltg.xml b/browser/components/search/searchplugins/wikipedia-ltg.xml
-rename from browser/locales/searchplugins/wikipedia-ltg.xml
-rename to browser/components/search/searchplugins/wikipedia-ltg.xml
-diff --git a/browser/locales/searchplugins/wikipedia-lv.xml b/browser/components/search/searchplugins/wikipedia-lv.xml
-rename from browser/locales/searchplugins/wikipedia-lv.xml
-rename to browser/components/search/searchplugins/wikipedia-lv.xml
-diff --git a/browser/locales/searchplugins/wikipedia-mk.xml b/browser/components/search/searchplugins/wikipedia-mk.xml
-rename from browser/locales/searchplugins/wikipedia-mk.xml
-rename to browser/components/search/searchplugins/wikipedia-mk.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ml.xml b/browser/components/search/searchplugins/wikipedia-ml.xml
-rename from browser/locales/searchplugins/wikipedia-ml.xml
-rename to browser/components/search/searchplugins/wikipedia-ml.xml
-diff --git a/browser/locales/searchplugins/wikipedia-mr.xml b/browser/components/search/searchplugins/wikipedia-mr.xml
-rename from browser/locales/searchplugins/wikipedia-mr.xml
-rename to browser/components/search/searchplugins/wikipedia-mr.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ms.xml b/browser/components/search/searchplugins/wikipedia-ms.xml
-rename from browser/locales/searchplugins/wikipedia-ms.xml
-rename to browser/components/search/searchplugins/wikipedia-ms.xml
-diff --git a/browser/locales/searchplugins/wikipedia-my.xml b/browser/components/search/searchplugins/wikipedia-my.xml
-rename from browser/locales/searchplugins/wikipedia-my.xml
-rename to browser/components/search/searchplugins/wikipedia-my.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ne.xml b/browser/components/search/searchplugins/wikipedia-ne.xml
-rename from browser/locales/searchplugins/wikipedia-ne.xml
-rename to browser/components/search/searchplugins/wikipedia-ne.xml
-diff --git a/browser/locales/searchplugins/wikipedia-nl.xml b/browser/components/search/searchplugins/wikipedia-nl.xml
-rename from browser/locales/searchplugins/wikipedia-nl.xml
-rename to browser/components/search/searchplugins/wikipedia-nl.xml
-diff --git a/browser/locales/searchplugins/wikipedia-oc.xml b/browser/components/search/searchplugins/wikipedia-oc.xml
-rename from browser/locales/searchplugins/wikipedia-oc.xml
-rename to browser/components/search/searchplugins/wikipedia-oc.xml
-diff --git a/browser/locales/searchplugins/wikipedia-or.xml b/browser/components/search/searchplugins/wikipedia-or.xml
-rename from browser/locales/searchplugins/wikipedia-or.xml
-rename to browser/components/search/searchplugins/wikipedia-or.xml
-diff --git a/browser/locales/searchplugins/wikipedia-pa.xml b/browser/components/search/searchplugins/wikipedia-pa.xml
-rename from browser/locales/searchplugins/wikipedia-pa.xml
-rename to browser/components/search/searchplugins/wikipedia-pa.xml
-diff --git a/browser/locales/searchplugins/wikipedia-pl.xml b/browser/components/search/searchplugins/wikipedia-pl.xml
-rename from browser/locales/searchplugins/wikipedia-pl.xml
-rename to browser/components/search/searchplugins/wikipedia-pl.xml
-diff --git a/browser/locales/searchplugins/wikipedia-pt.xml b/browser/components/search/searchplugins/wikipedia-pt.xml
-rename from browser/locales/searchplugins/wikipedia-pt.xml
-rename to browser/components/search/searchplugins/wikipedia-pt.xml
-diff --git a/browser/locales/searchplugins/wikipedia-rm.xml b/browser/components/search/searchplugins/wikipedia-rm.xml
-rename from browser/locales/searchplugins/wikipedia-rm.xml
-rename to browser/components/search/searchplugins/wikipedia-rm.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ro.xml b/browser/components/search/searchplugins/wikipedia-ro.xml
-rename from browser/locales/searchplugins/wikipedia-ro.xml
-rename to browser/components/search/searchplugins/wikipedia-ro.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ru.xml b/browser/components/search/searchplugins/wikipedia-ru.xml
-rename from browser/locales/searchplugins/wikipedia-ru.xml
-rename to browser/components/search/searchplugins/wikipedia-ru.xml
-diff --git a/browser/locales/searchplugins/wikipedia-si.xml b/browser/components/search/searchplugins/wikipedia-si.xml
-rename from browser/locales/searchplugins/wikipedia-si.xml
-rename to browser/components/search/searchplugins/wikipedia-si.xml
-diff --git a/browser/locales/searchplugins/wikipedia-sk.xml b/browser/components/search/searchplugins/wikipedia-sk.xml
-rename from browser/locales/searchplugins/wikipedia-sk.xml
-rename to browser/components/search/searchplugins/wikipedia-sk.xml
-diff --git a/browser/locales/searchplugins/wikipedia-sl.xml b/browser/components/search/searchplugins/wikipedia-sl.xml
-rename from browser/locales/searchplugins/wikipedia-sl.xml
-rename to browser/components/search/searchplugins/wikipedia-sl.xml
-diff --git a/browser/locales/searchplugins/wikipedia-sq.xml b/browser/components/search/searchplugins/wikipedia-sq.xml
-rename from browser/locales/searchplugins/wikipedia-sq.xml
-rename to browser/components/search/searchplugins/wikipedia-sq.xml
-diff --git a/browser/locales/searchplugins/wikipedia-sr.xml b/browser/components/search/searchplugins/wikipedia-sr.xml
-rename from browser/locales/searchplugins/wikipedia-sr.xml
-rename to browser/components/search/searchplugins/wikipedia-sr.xml
-diff --git a/browser/locales/searchplugins/wikipedia-sv-SE.xml b/browser/components/search/searchplugins/wikipedia-sv-SE.xml
-rename from browser/locales/searchplugins/wikipedia-sv-SE.xml
-rename to browser/components/search/searchplugins/wikipedia-sv-SE.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ta.xml b/browser/components/search/searchplugins/wikipedia-ta.xml
-rename from browser/locales/searchplugins/wikipedia-ta.xml
-rename to browser/components/search/searchplugins/wikipedia-ta.xml
-diff --git a/browser/locales/searchplugins/wikipedia-te.xml b/browser/components/search/searchplugins/wikipedia-te.xml
-rename from browser/locales/searchplugins/wikipedia-te.xml
-rename to browser/components/search/searchplugins/wikipedia-te.xml
-diff --git a/browser/locales/searchplugins/wikipedia-th.xml b/browser/components/search/searchplugins/wikipedia-th.xml
-rename from browser/locales/searchplugins/wikipedia-th.xml
-rename to browser/components/search/searchplugins/wikipedia-th.xml
-diff --git a/browser/locales/searchplugins/wikipedia-tl.xml b/browser/components/search/searchplugins/wikipedia-tl.xml
-rename from browser/locales/searchplugins/wikipedia-tl.xml
-rename to browser/components/search/searchplugins/wikipedia-tl.xml
-diff --git a/browser/locales/searchplugins/wikipedia-tr.xml b/browser/components/search/searchplugins/wikipedia-tr.xml
-rename from browser/locales/searchplugins/wikipedia-tr.xml
-rename to browser/components/search/searchplugins/wikipedia-tr.xml
-diff --git a/browser/locales/searchplugins/wikipedia-uk.xml b/browser/components/search/searchplugins/wikipedia-uk.xml
-rename from browser/locales/searchplugins/wikipedia-uk.xml
-rename to browser/components/search/searchplugins/wikipedia-uk.xml
-diff --git a/browser/locales/searchplugins/wikipedia-ur.xml b/browser/components/search/searchplugins/wikipedia-ur.xml
-rename from browser/locales/searchplugins/wikipedia-ur.xml
-rename to browser/components/search/searchplugins/wikipedia-ur.xml
-diff --git a/browser/locales/searchplugins/wikipedia-uz.xml b/browser/components/search/searchplugins/wikipedia-uz.xml
-rename from browser/locales/searchplugins/wikipedia-uz.xml
-rename to browser/components/search/searchplugins/wikipedia-uz.xml
-diff --git a/browser/locales/searchplugins/wikipedia-vi.xml b/browser/components/search/searchplugins/wikipedia-vi.xml
-rename from browser/locales/searchplugins/wikipedia-vi.xml
-rename to browser/components/search/searchplugins/wikipedia-vi.xml
-diff --git a/browser/locales/searchplugins/wikipedia-wo.xml b/browser/components/search/searchplugins/wikipedia-wo.xml
-rename from browser/locales/searchplugins/wikipedia-wo.xml
-rename to browser/components/search/searchplugins/wikipedia-wo.xml
-diff --git a/browser/locales/searchplugins/wikipedia-zh-CN.xml b/browser/components/search/searchplugins/wikipedia-zh-CN.xml
-rename from browser/locales/searchplugins/wikipedia-zh-CN.xml
-rename to browser/components/search/searchplugins/wikipedia-zh-CN.xml
-diff --git a/browser/locales/searchplugins/wikipedia-zh-TW.xml b/browser/components/search/searchplugins/wikipedia-zh-TW.xml
-rename from browser/locales/searchplugins/wikipedia-zh-TW.xml
-rename to browser/components/search/searchplugins/wikipedia-zh-TW.xml
-diff --git a/browser/locales/searchplugins/wikipedia.xml b/browser/components/search/searchplugins/wikipedia.xml
-rename from browser/locales/searchplugins/wikipedia.xml
-rename to browser/components/search/searchplugins/wikipedia.xml
-diff --git a/browser/locales/searchplugins/wiktionary-oc.xml b/browser/components/search/searchplugins/wiktionary-oc.xml
-rename from browser/locales/searchplugins/wiktionary-oc.xml
-rename to browser/components/search/searchplugins/wiktionary-oc.xml
-diff --git a/browser/locales/searchplugins/wiktionary-te.xml b/browser/components/search/searchplugins/wiktionary-te.xml
-rename from browser/locales/searchplugins/wiktionary-te.xml
-rename to browser/components/search/searchplugins/wiktionary-te.xml
-diff --git a/browser/locales/searchplugins/wolnelektury-pl.xml b/browser/components/search/searchplugins/wolnelektury-pl.xml
-rename from browser/locales/searchplugins/wolnelektury-pl.xml
-rename to browser/components/search/searchplugins/wolnelektury-pl.xml
-diff --git a/browser/locales/searchplugins/yahoo-NO.xml b/browser/components/search/searchplugins/yahoo-NO.xml
-rename from browser/locales/searchplugins/yahoo-NO.xml
-rename to browser/components/search/searchplugins/yahoo-NO.xml
-diff --git a/browser/locales/searchplugins/yahoo-answer-zh-TW.xml b/browser/components/search/searchplugins/yahoo-answer-zh-TW.xml
-rename from browser/locales/searchplugins/yahoo-answer-zh-TW.xml
-rename to browser/components/search/searchplugins/yahoo-answer-zh-TW.xml
-diff --git a/browser/locales/searchplugins/yahoo-ar.xml b/browser/components/search/searchplugins/yahoo-ar.xml
-rename from browser/locales/searchplugins/yahoo-ar.xml
-rename to browser/components/search/searchplugins/yahoo-ar.xml
-diff --git a/browser/locales/searchplugins/yahoo-bid-zh-TW.xml b/browser/components/search/searchplugins/yahoo-bid-zh-TW.xml
-rename from browser/locales/searchplugins/yahoo-bid-zh-TW.xml
-rename to browser/components/search/searchplugins/yahoo-bid-zh-TW.xml
-diff --git a/browser/locales/searchplugins/yahoo-br.xml b/browser/components/search/searchplugins/yahoo-br.xml
-rename from browser/locales/searchplugins/yahoo-br.xml
-rename to browser/components/search/searchplugins/yahoo-br.xml
-diff --git a/browser/locales/searchplugins/yahoo-ch.xml b/browser/components/search/searchplugins/yahoo-ch.xml
-rename from browser/locales/searchplugins/yahoo-ch.xml
-rename to browser/components/search/searchplugins/yahoo-ch.xml
-diff --git a/browser/locales/searchplugins/yahoo-cl.xml b/browser/components/search/searchplugins/yahoo-cl.xml
-rename from browser/locales/searchplugins/yahoo-cl.xml
-rename to browser/components/search/searchplugins/yahoo-cl.xml
-diff --git a/browser/locales/searchplugins/yahoo-de.xml b/browser/components/search/searchplugins/yahoo-de.xml
-rename from browser/locales/searchplugins/yahoo-de.xml
-rename to browser/components/search/searchplugins/yahoo-de.xml
-diff --git a/browser/locales/searchplugins/yahoo-en-CA.xml b/browser/components/search/searchplugins/yahoo-en-CA.xml
-rename from browser/locales/searchplugins/yahoo-en-CA.xml
-rename to browser/components/search/searchplugins/yahoo-en-CA.xml
-diff --git a/browser/locales/searchplugins/yahoo-en-GB.xml b/browser/components/search/searchplugins/yahoo-en-GB.xml
-rename from browser/locales/searchplugins/yahoo-en-GB.xml
-rename to browser/components/search/searchplugins/yahoo-en-GB.xml
-diff --git a/browser/locales/searchplugins/yahoo-es.xml b/browser/components/search/searchplugins/yahoo-es.xml
-rename from browser/locales/searchplugins/yahoo-es.xml
-rename to browser/components/search/searchplugins/yahoo-es.xml
-diff --git a/browser/locales/searchplugins/yahoo-espanol.xml b/browser/components/search/searchplugins/yahoo-espanol.xml
-rename from browser/locales/searchplugins/yahoo-espanol.xml
-rename to browser/components/search/searchplugins/yahoo-espanol.xml
-diff --git a/browser/locales/searchplugins/yahoo-fi.xml b/browser/components/search/searchplugins/yahoo-fi.xml
-rename from browser/locales/searchplugins/yahoo-fi.xml
-rename to browser/components/search/searchplugins/yahoo-fi.xml
-diff --git a/browser/locales/searchplugins/yahoo-france.xml b/browser/components/search/searchplugins/yahoo-france.xml
-rename from browser/locales/searchplugins/yahoo-france.xml
-rename to browser/components/search/searchplugins/yahoo-france.xml
-diff --git a/browser/locales/searchplugins/yahoo-fy-NL.xml b/browser/components/search/searchplugins/yahoo-fy-NL.xml
-rename from browser/locales/searchplugins/yahoo-fy-NL.xml
-rename to browser/components/search/searchplugins/yahoo-fy-NL.xml
-diff --git a/browser/locales/searchplugins/yahoo-id.xml b/browser/components/search/searchplugins/yahoo-id.xml
-rename from browser/locales/searchplugins/yahoo-id.xml
-rename to browser/components/search/searchplugins/yahoo-id.xml
-diff --git a/browser/locales/searchplugins/yahoo-in.xml b/browser/components/search/searchplugins/yahoo-in.xml
-rename from browser/locales/searchplugins/yahoo-in.xml
-rename to browser/components/search/searchplugins/yahoo-in.xml
-diff --git a/browser/locales/searchplugins/yahoo-it.xml b/browser/components/search/searchplugins/yahoo-it.xml
-rename from browser/locales/searchplugins/yahoo-it.xml
-rename to browser/components/search/searchplugins/yahoo-it.xml
-diff --git a/browser/locales/searchplugins/yahoo-jp-auctions.xml b/browser/components/search/searchplugins/yahoo-jp-auctions.xml
-rename from browser/locales/searchplugins/yahoo-jp-auctions.xml
-rename to browser/components/search/searchplugins/yahoo-jp-auctions.xml
-diff --git a/browser/locales/searchplugins/yahoo-jp.xml b/browser/components/search/searchplugins/yahoo-jp.xml
-rename from browser/locales/searchplugins/yahoo-jp.xml
-rename to browser/components/search/searchplugins/yahoo-jp.xml
-diff --git a/browser/locales/searchplugins/yahoo-mx.xml b/browser/components/search/searchplugins/yahoo-mx.xml
-rename from browser/locales/searchplugins/yahoo-mx.xml
-rename to browser/components/search/searchplugins/yahoo-mx.xml
-diff --git a/browser/locales/searchplugins/yahoo-sv-SE.xml b/browser/components/search/searchplugins/yahoo-sv-SE.xml
-rename from browser/locales/searchplugins/yahoo-sv-SE.xml
-rename to browser/components/search/searchplugins/yahoo-sv-SE.xml
-diff --git a/browser/locales/searchplugins/yahoo-tl.xml b/browser/components/search/searchplugins/yahoo-tl.xml
-rename from browser/locales/searchplugins/yahoo-tl.xml
-rename to browser/components/search/searchplugins/yahoo-tl.xml
-diff --git a/browser/locales/searchplugins/yahoo-zh-TW-HK.xml b/browser/components/search/searchplugins/yahoo-zh-TW-HK.xml
-rename from browser/locales/searchplugins/yahoo-zh-TW-HK.xml
-rename to browser/components/search/searchplugins/yahoo-zh-TW-HK.xml
-diff --git a/browser/locales/searchplugins/yahoo-zh-TW.xml b/browser/components/search/searchplugins/yahoo-zh-TW.xml
-rename from browser/locales/searchplugins/yahoo-zh-TW.xml
-rename to browser/components/search/searchplugins/yahoo-zh-TW.xml
-diff --git a/browser/locales/searchplugins/yahoo.xml b/browser/components/search/searchplugins/yahoo.xml
-rename from browser/locales/searchplugins/yahoo.xml
-rename to browser/components/search/searchplugins/yahoo.xml
-diff --git a/browser/locales/searchplugins/yandex-az.xml b/browser/components/search/searchplugins/yandex-az.xml
-rename from browser/locales/searchplugins/yandex-az.xml
-rename to browser/components/search/searchplugins/yandex-az.xml
-diff --git a/browser/locales/searchplugins/yandex-by.xml b/browser/components/search/searchplugins/yandex-by.xml
-rename from browser/locales/searchplugins/yandex-by.xml
-rename to browser/components/search/searchplugins/yandex-by.xml
-diff --git a/browser/locales/searchplugins/yandex-en.xml b/browser/components/search/searchplugins/yandex-en.xml
-rename from browser/locales/searchplugins/yandex-en.xml
-rename to browser/components/search/searchplugins/yandex-en.xml
-diff --git a/browser/locales/searchplugins/yandex-kk.xml b/browser/components/search/searchplugins/yandex-kk.xml
-rename from browser/locales/searchplugins/yandex-kk.xml
-rename to browser/components/search/searchplugins/yandex-kk.xml
-diff --git a/browser/locales/searchplugins/yandex-ru.xml b/browser/components/search/searchplugins/yandex-ru.xml
-rename from browser/locales/searchplugins/yandex-ru.xml
-rename to browser/components/search/searchplugins/yandex-ru.xml
-diff --git a/browser/locales/searchplugins/yandex-tr.xml b/browser/components/search/searchplugins/yandex-tr.xml
-rename from browser/locales/searchplugins/yandex-tr.xml
-rename to browser/components/search/searchplugins/yandex-tr.xml
-diff --git a/browser/locales/searchplugins/yandex-uk.xml b/browser/components/search/searchplugins/yandex-uk.xml
-rename from browser/locales/searchplugins/yandex-uk.xml
-rename to browser/components/search/searchplugins/yandex-uk.xml
-diff --git a/browser/locales/searchplugins/zoznam-sk.xml b/browser/components/search/searchplugins/zoznam-sk.xml
-rename from browser/locales/searchplugins/zoznam-sk.xml
-rename to browser/components/search/searchplugins/zoznam-sk.xml
-diff --git a/browser/components/search/test/browser.ini b/browser/components/search/test/browser.ini
---- a/browser/components/search/test/browser.ini
-+++ b/browser/components/search/test/browser.ini
-@@ -19,21 +19,18 @@ support-files =
- [browser_addEngine.js]
- [browser_amazon.js]
- [browser_bing.js]
- [browser_contextmenu.js]
- [browser_contextSearchTabPosition.js]
- skip-if = os == "mac" # bug 967013
- [browser_ddg.js]
- [browser_eBay.js]
--skip-if = artifact # bug 1315953
- [browser_google.js]
--skip-if = artifact # bug 1315953
- [browser_google_behavior.js]
--skip-if = artifact # bug 1315953
- [browser_healthreport.js]
- [browser_hiddenOneOffs_cleanup.js]
- [browser_hiddenOneOffs_diacritics.js]
- [browser_oneOffContextMenu.js]
- [browser_oneOffContextMenu_setDefault.js]
- [browser_oneOffHeader.js]
- skip-if = os == "mac" #1421238
- [browser_private_search_perwindowpb.js]
-diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
---- a/browser/locales/Makefile.in
-+++ b/browser/locales/Makefile.in
-@@ -38,42 +38,24 @@ MOZ_PKG_MAC_EXTRA=--symlink '/Applicatio
- endif
- 
- ifeq ($(CPU_ARCH), aarch64)
- MOZ_SFX_PACKAGE=$(topsrcdir)/other-licenses/7zstub/firefox/7zSD.ARM64.sfx
- else
- MOZ_SFX_PACKAGE=$(topsrcdir)/other-licenses/7zstub/firefox/7zSD.Win32.sfx
- endif
- 
--SEARCHPLUGINS_FILENAMES := $(or $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD))), $(error Missing search plugins))
--SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD)
--SEARCHPLUGINS_TARGET := libs searchplugins
--SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_FILENAMES)),$(or $(wildcard $(srcdir)/searchplugins/$(plugin)),$(error Missing searchplugin: $(plugin))))
--# Some locale-specific search plugins may have preprocessor directives, but the
--# default en-US ones do not.
--SEARCHPLUGINS_FLAGS := --silence-missing-directive-warnings
--PP_TARGETS += SEARCHPLUGINS
--
--list-json = $(SEARCHPLUGINS_PATH)/list.json
--GARBAGE += $(list-json)
--
--libs:: searchplugins
--
- # Required for l10n.mk - defines a list of app sub dirs that should
- # be included in langpack xpis.
- DIST_SUBDIRS = $(DIST_SUBDIR)
- 
- include $(topsrcdir)/config/rules.mk
- 
- include $(topsrcdir)/toolkit/locales/l10n.mk
- 
--$(list-json): $(call mkdir_deps,$(SEARCHPLUGINS_PATH)) $(if $(IS_LANGUAGE_REPACK),FORCE)
--	$(call py_action,generate_searchjson,$(srcdir)/search/list.json $(AB_CD) $(list-json))
--searchplugins:: $(list-json)
--
- libs-%: AB_CD=$*
- libs-%:
- 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
- 	$(NSINSTALL) -D $(DIST)/install
- 	@$(MAKE) -C ../../toolkit/locales libs-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
- 	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
- 	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
- ifneq (,$(wildcard ../extensions/formautofill/locales))
-@@ -81,17 +63,16 @@ ifneq (,$(wildcard ../extensions/formaut
- endif
- 	@$(MAKE) -C ../extensions/jaws-esr/locales AB_CD=$* XPI_NAME=locale-$*
- 	@$(MAKE) -C ../extensions/pocket/locale AB_CD=$* XPI_NAME=locale-$*
- ifneq '$(or $(MOZ_DEV_EDITION),$(NIGHTLY_BUILD))' ''
- 	@$(MAKE) -C ../extensions/webcompat-reporter/locales AB_CD=$* XPI_NAME=locale-$*
- endif
- 	@$(MAKE) -C ../../devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
- 	@$(MAKE) -C ../../devtools/shim/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
--	@$(MAKE) -B searchplugins AB_CD=$* XPI_NAME=locale-$*
- 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
- 	@$(MAKE) multilocale.txt-$* AB_CD=$* XPI_NAME=locale-$*
- 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
- 
- chrome-%: AB_CD=$*
- chrome-%: IS_LANGUAGE_REPACK=1
- chrome-%:
- 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
-diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
---- a/browser/locales/jar.mn
-+++ b/browser/locales/jar.mn
-@@ -80,29 +80,16 @@
-     locale/browser/preferences/search.dtd             (%chrome/browser/preferences/search.dtd)
-     locale/browser/preferences/security.dtd           (%chrome/browser/preferences/security.dtd)
-     locale/browser/preferences/selectBookmark.dtd     (%chrome/browser/preferences/selectBookmark.dtd)
-     locale/browser/preferences/siteDataSettings.dtd     (%chrome/browser/preferences/siteDataSettings.dtd)
-     locale/browser/preferences/sync.dtd               (%chrome/browser/preferences/sync.dtd)
-     locale/browser/preferences/translation.dtd        (%chrome/browser/preferences/translation.dtd)
-     locale/browser/syncBrand.dtd                (%chrome/browser/syncBrand.dtd)
-     locale/browser/syncSetup.properties         (%chrome/browser/syncSetup.properties)
--#if BUILD_FASTER
--    locale/browser/searchplugins/               (searchplugins/*.xml)
--    locale/browser/searchplugins/list.json      (search/list.json)
--#else
--    locale/browser/searchplugins/               (.deps/generated_@AB_CD@/*.xml)
--    locale/browser/searchplugins/list.json      (.deps/generated_@AB_CD@/list.json)
--#endif
--    locale/browser/searchplugins/images/amazon.ico     (searchplugins/images/amazon.ico)
--    locale/browser/searchplugins/images/ebay.ico       (searchplugins/images/ebay.ico)
--    locale/browser/searchplugins/images/wikipedia.ico  (searchplugins/images/wikipedia.ico)
--    locale/browser/searchplugins/images/yahoo.ico      (searchplugins/images/yahoo.ico)
--    locale/browser/searchplugins/images/yandex-en.ico  (searchplugins/images/yandex-en.ico)
--    locale/browser/searchplugins/images/yandex-ru.ico  (searchplugins/images/yandex-ru.ico)
- % locale browser-region @AB_CD@ %locale/browser-region/
-     locale/browser-region/region.properties        (%chrome/browser-region/region.properties)
- # the following files are browser-specific overrides
-     locale/browser/netError.dtd                (%chrome/overrides/netError.dtd)
-     locale/browser/appstrings.properties       (%chrome/overrides/appstrings.properties)
-     locale/browser/downloads/settingsChange.dtd  (%chrome/overrides/settingsChange.dtd)
- % locale pdf.js @AB_CD@ %locale/pdfviewer/
-     locale/pdfviewer/viewer.properties             (%pdfviewer/viewer.properties)
-diff --git a/browser/locales/moz.build b/browser/locales/moz.build
---- a/browser/locales/moz.build
-+++ b/browser/locales/moz.build
-@@ -39,16 +39,10 @@ with Files("**"):
-     BUG_COMPONENT = ("Toolkit", "Build Config")
- 
- with Files("all-locales"):
-     BUG_COMPONENT = ("Core", "Localization")
- 
- with Files("en-US/**"):
-     BUG_COMPONENT = ("Core", "Localization")
- 
--with Files("search/**"):
--    BUG_COMPONENT = ("Firefox", "Search")
--
--with Files("searchplugins/**"):
--    BUG_COMPONENT = ("Firefox", "Search")
--
- with Files("shipped-locales"):
-     BUG_COMPONENT = ("Core", "Localization")
-diff --git a/browser/modules/ContentSearch.jsm b/browser/modules/ContentSearch.jsm
---- a/browser/modules/ContentSearch.jsm
-+++ b/browser/modules/ContentSearch.jsm
-@@ -102,16 +102,17 @@ var ContentSearch = {
-   _destroyedPromise: null,
- 
-   // The current controller and browser in _onMessageGetSuggestions.  Allows
-   // fetch cancellation from _cancelSuggestions.
-   _currentSuggestion: null,
- 
-   init() {
-     Services.obs.addObserver(this, "browser-search-engine-modified");
-+    Services.obs.addObserver(this, "browser-search-service");
-     Services.obs.addObserver(this, "shutdown-leaks-before-check");
-     Services.prefs.addObserver("browser.search.hiddenOneOffs", this);
-     this._stringBundle = Services.strings.createBundle("chrome://global/locale/autocomplete.properties");
-   },
- 
-   get searchSuggestionUIStrings() {
-     if (this._searchSuggestionUIStrings) {
-       return this._searchSuggestionUIStrings;
-@@ -128,16 +129,17 @@ var ContentSearch = {
-   },
- 
-   destroy() {
-     if (this._destroyedPromise) {
-       return this._destroyedPromise;
-     }
- 
-     Services.obs.removeObserver(this, "browser-search-engine-modified");
-+    Services.obs.removeObserver(this, "browser-search-service");
-     Services.obs.removeObserver(this, "shutdown-leaks-before-check");
- 
-     this._eventQueue.length = 0;
-     this._destroyedPromise = Promise.resolve(this._currentEventPromise);
-     return this._destroyedPromise;
-   },
- 
-   /**
-@@ -179,16 +181,20 @@ var ContentSearch = {
-       type: "Message",
-       data: msg,
-     });
-     this._processEventQueue();
-   },
- 
-   observe(subj, topic, data) {
-     switch (topic) {
-+    case "browser-search-service":
-+      if (data != "init-complete") {
-+        break;
-+      }
-     case "nsPref:changed":
-     case "browser-search-engine-modified":
-       this._eventQueue.push({
-         type: "Observe",
-         data,
-       });
-       this._processEventQueue();
-       break;
-diff --git a/toolkit/components/search/nsSearchService.js b/toolkit/components/search/nsSearchService.js
---- a/toolkit/components/search/nsSearchService.js
-+++ b/toolkit/components/search/nsSearchService.js
-@@ -51,17 +51,17 @@ const NS_APP_DISTRIBUTION_SEARCH_DIR_LIS
- const NS_APP_USER_PROFILE_50_DIR = "ProfD";
- 
- // We load plugins from APP_SEARCH_PREFIX, where a list.txt
- // file needs to exist to list available engines.
- const APP_SEARCH_PREFIX = "resource://search-plugins/";
- 
- // See documentation in nsIBrowserSearchService.idl.
- const SEARCH_ENGINE_TOPIC        = "browser-search-engine-modified";
--const REQ_LOCALES_CHANGED_TOPIC  = "intl:requested-locales-changed";
-+const TOPIC_LOCALES_CHANGE       = "intl:app-locales-changed";
- const QUIT_APPLICATION_TOPIC     = "quit-application";
- 
- const SEARCH_ENGINE_REMOVED      = "engine-removed";
- const SEARCH_ENGINE_ADDED        = "engine-added";
- const SEARCH_ENGINE_CHANGED      = "engine-changed";
- const SEARCH_ENGINE_LOADED       = "engine-loaded";
- const SEARCH_ENGINE_CURRENT      = "engine-current";
- const SEARCH_ENGINE_DEFAULT      = "engine-default";
-@@ -3064,19 +3064,19 @@ SearchService.prototype = {
-         await ensureKnownCountryCode(this);
-         // Due to the HTTP requests done by ensureKnownCountryCode, it's possible that
-         // at this point a synchronous init has been forced by other code.
-         if (!gInitialized)
-           await this._asyncLoadEngines(cache);
- 
-         // Typically we'll re-init as a result of a pref observer,
-         // so signal to 'callers' that we're done.
-+        gInitialized = true;
-         Services.obs.notifyObservers(null, SEARCH_SERVICE_TOPIC, "init-complete");
-         this._recordEngineTelemetry();
--        gInitialized = true;
-       } catch (err) {
-         LOG("Reinit failed: " + err);
-         Services.obs.notifyObservers(null, SEARCH_SERVICE_TOPIC, "reinit-failed");
-       } finally {
-         Services.obs.notifyObservers(null, SEARCH_SERVICE_TOPIC, "reinit-complete");
-       }
-     })();
-   },
-@@ -3479,24 +3479,41 @@ SearchService.prototype = {
-       this._parseListJSON(list, uris);
-     }
-     return uris;
-   },
- 
-   _parseListJSON: function SRCH_SVC_parseListJSON(list, uris) {
-     let searchRegion =  Services.prefs.getCharPref("browser.search.region", "");
- 
--    let searchSettings;
-+    let json;
-     try {
--      searchSettings = JSON.parse(list);
-+      json = JSON.parse(list);
-     } catch (e) {
--      LOG("failing to parse list.json: " + e);
-+      Cu.reportError("parseListJSON: Failed to parse list.json: " + e);
-+      dump("parseListJSON: Failed to parse list.json: " + e + "\n");
-       return;
-     }
- 
-+    let searchSettings;
-+    let locale = Services.locale.getAppLocaleAsBCP47();
-+    if ("locales" in json &&
-+        locale in json.locales) {
-+      searchSettings = json.locales[locale];
-+    } else {
-+      // No locales were found, so use the JSON as is.
-+      // It should have a default section.
-+      if (!("default" in json)) {
-+        Cu.reportError("parseListJSON: Missing default in list.json");
-+        dump("parseListJSON: Missing default in list.json\n");
-+        return;
-+      }
-+      searchSettings = json;
-+    }
-+
-     // Check if we have a useable country specific list of visible default engines.
-     // This will only be set if we got the list from the Mozilla search server;
-     // it will not be set for distributions.
-     let engineNames;
-     let visibleDefaultEngines = this.getVerifiedGlobalAttr("visibleDefaultEngines");
-     if (visibleDefaultEngines) {
-       let jarNames = new Set();
-       for (let region in searchSettings) {
-@@ -3543,17 +3560,17 @@ SearchService.prototype = {
-         "visibleDefaultEngines" in searchSettings[searchRegion]) {
-         engineNames = searchSettings[searchRegion].visibleDefaultEngines;
-       } else {
-         engineNames = searchSettings.default.visibleDefaultEngines;
-       }
-     }
- 
-     // Remove any engine names that are supposed to be ignored.
--    // This pref is only allows in a partner distribution.
-+    // This pref is only allowed in a partner distribution.
-     let branch = Services.prefs.getDefaultBranch(BROWSER_SEARCH_PREF);
-     if (isPartnerBuild() &&
-         branch.getPrefType("ignoredJAREngines") == branch.PREF_STRING) {
-       let ignoredJAREngines = branch.getCharPref("ignoredJAREngines")
-                                     .split(",");
-       let filteredEngineNames = engineNames.filter(e => !ignoredJAREngines.includes(e));
-       // Don't allow all engines to be hidden
-       if (filteredEngineNames.length > 0) {
-@@ -3571,35 +3588,53 @@ SearchService.prototype = {
-       for (let engine in esrOverrides) {
-         let index = engineNames.indexOf(engine);
-         if (index > -1) {
-           engineNames[index] = esrOverrides[engine];
-         }
-       }
-     }
- 
-+    if ("regionOverrides" in json &&
-+        searchRegion in json.regionOverrides) {
-+      for (let engine in json.regionOverrides[searchRegion]) {
-+        let index = engineNames.indexOf(engine);
-+        if (index > -1) {
-+          engineNames[index] = json.regionOverrides[searchRegion][engine];
-+        }
-+      }
-+    }
-+
-     for (let name of engineNames) {
-       uris.push(APP_SEARCH_PREFIX + name + ".xml");
-     }
- 
-     // Store this so that it can be used while writing the cache file.
-     this._visibleDefaultEngines = engineNames;
- 
-     if (searchRegion && searchRegion in searchSettings &&
-         "searchDefault" in searchSettings[searchRegion]) {
-       this._searchDefault = searchSettings[searchRegion].searchDefault;
-+    } else if ("searchDefault" in searchSettings.default) {
-+      this._searchDefault = searchSettings.default.searchDefault;
-     } else {
--      this._searchDefault = searchSettings.default.searchDefault;
-+      this._searchDefault = json.default.searchDefault;
-+    }
-+
-+    if (!this._searchDefault) {
-+      Cu.reportError("parseListJSON: No searchDefault");
-     }
- 
-     if (searchRegion && searchRegion in searchSettings &&
-         "searchOrder" in searchSettings[searchRegion]) {
-       this._searchOrder = searchSettings[searchRegion].searchOrder;
-     } else if ("searchOrder" in searchSettings.default) {
-       this._searchOrder = searchSettings.default.searchOrder;
-+    } else if ("searchOrder" in json.default) {
-+      this._searchOrder = json.default.searchOrder;
-     }
-   },
- 
-   _parseListTxt: function SRCH_SVC_parseListTxt(list, uris) {
-     let names = list.split("\n").filter(n => !!n);
-     // This maps the names of our built-in engines to a boolean
-     // indicating whether it should be hidden by default.
-     let jarNames = new Map();
-@@ -4555,19 +4590,20 @@ SearchService.prototype = {
-             break;
-         }
-         break;
- 
-       case QUIT_APPLICATION_TOPIC:
-         this._removeObservers();
-         break;
- 
--      case REQ_LOCALES_CHANGED_TOPIC:
-+      case TOPIC_LOCALES_CHANGE:
-         // Locale changed. Re-init. We rely on observers, because we can't
-         // return this promise to anyone.
-+        // FYI, This is also used by the search tests to do an async reinit.
-         this._asyncReInit();
-         break;
-     }
-   },
- 
-   // nsITimerCallback
-   notify: function SRCH_SVC_notify(aTimer) {
-     LOG("_notify: checking for updates");
-@@ -4612,20 +4648,17 @@ SearchService.prototype = {
-       // There might be a race between synchronous and asynchronous
-       // initialization for which we try to register the observers twice.
-       return;
-     }
-     this._observersAdded = true;
- 
-     Services.obs.addObserver(this, SEARCH_ENGINE_TOPIC);
-     Services.obs.addObserver(this, QUIT_APPLICATION_TOPIC);
--
--    if (AppConstants.MOZ_BUILD_APP == "mobile/android") {
--      Services.obs.addObserver(this, REQ_LOCALES_CHANGED_TOPIC);
--    }
-+    Services.obs.addObserver(this, TOPIC_LOCALES_CHANGE);
- 
-     // The current stage of shutdown. Used to help analyze crash
-     // signatures in case of shutdown timeout.
-     let shutdownState = {
-       step: "Not started",
-       latestError: {
-         message: undefined,
-         stack: undefined
-@@ -4657,20 +4690,17 @@ SearchService.prototype = {
-       () => shutdownState
-     );
-   },
-   _observersAdded: false,
- 
-   _removeObservers: function SRCH_SVC_removeObservers() {
-     Services.obs.removeObserver(this, SEARCH_ENGINE_TOPIC);
-     Services.obs.removeObserver(this, QUIT_APPLICATION_TOPIC);
--
--    if (AppConstants.MOZ_BUILD_APP == "mobile/android") {
--      Services.obs.removeObserver(this, REQ_LOCALES_CHANGED_TOPIC);
--    }
-+    Services.obs.removeObserver(this, TOPIC_LOCALES_CHANGE);
-   },
- 
-   QueryInterface: XPCOMUtils.generateQI([
-     Ci.nsIBrowserSearchService,
-     Ci.nsIObserver,
-     Ci.nsITimerCallback
-   ])
- };
-diff --git a/toolkit/components/search/tests/xpcshell/data/list.json b/toolkit/components/search/tests/xpcshell/data/list.json
---- a/toolkit/components/search/tests/xpcshell/data/list.json
-+++ b/toolkit/components/search/tests/xpcshell/data/list.json
-@@ -1,9 +1,30 @@
- {
-   "default": {
-     "searchDefault": "Test search engine",
-     "searchOrder": ["engine-resourceicon", "engine-chromeicon"],
-     "visibleDefaultEngines": [
-       "engine", "engine-pref", "engine-rel-searchform-purpose", "engine-system-purpose", "engine-chromeicon", "engine-resourceicon"
-     ]
-+  },
-+  "regionOverrides": {
-+    "RU": {
-+      "engine": "engine-chromeicon"
-+    }
-+  },
-+  "locales": {
-+    "de": {
-+      "default": {
-+        "visibleDefaultEngines": [
-+          "engine"
-+        ]
-+      }
-+    },
-+    "fr": {
-+      "default": {
-+        "visibleDefaultEngines": [
-+          "engine", "engine-pref"
-+        ]
-+      }
-+    }
-   }
- }
-diff --git a/toolkit/components/search/tests/xpcshell/head_search.js b/toolkit/components/search/tests/xpcshell/head_search.js
---- a/toolkit/components/search/tests/xpcshell/head_search.js
-+++ b/toolkit/components/search/tests/xpcshell/head_search.js
-@@ -227,17 +227,17 @@ function isUSTimezone() {
-   // Hawaii-Aleutian Standard Time (http://www.timeanddate.com/time/zones/hast)
- 
-   let UTCOffset = (new Date()).getTimezoneOffset();
-   return UTCOffset >= 150 && UTCOffset <= 600;
- }
- 
- const kDefaultenginenamePref = "browser.search.defaultenginename";
- const kTestEngineName = "Test search engine";
--const REQ_LOCALES_CHANGED_TOPIC = "intl:requested-locales-changed";
-+const TOPIC_LOCALES_CHANGE = "intl:app-locales-changed";
- 
- function getDefaultEngineName(isUS) {
-   // The list of visibleDefaultEngines needs to match or the cache will be ignored.
-   let chan = NetUtil.newChannel({
-     uri: "resource://search-plugins/list.json",
-     loadUsingSystemPrincipal: true
-   });
-   let searchSettings = parseJsonFromStream(chan.open2());
-@@ -458,17 +458,17 @@ function asyncInit() {
-     });
-   });
- }
- 
- function asyncReInit() {
-   let promise = waitForSearchNotification("reinit-complete");
- 
-   Services.search.QueryInterface(Ci.nsIObserver)
--          .observe(null, REQ_LOCALES_CHANGED_TOPIC, null);
-+          .observe(null, TOPIC_LOCALES_CHANGE, null);
- 
-   return promise;
- }
- 
- // This "enum" from nsSearchService.js
- const TELEMETRY_RESULT_ENUM = {
-   SUCCESS: 0,
-   SUCCESS_WITHOUT_DATA: 1,
-diff --git a/toolkit/components/search/tests/xpcshell/test_list_json_locale.js b/toolkit/components/search/tests/xpcshell/test_list_json_locale.js
-new file mode 100644
---- /dev/null
-+++ b/toolkit/components/search/tests/xpcshell/test_list_json_locale.js
-@@ -0,0 +1,60 @@
-+/* Any copyright is dedicated to the Public Domain.
-+ * http://creativecommons.org/publicdomain/zero/1.0/ */
-+
-+/* Check default search engine is picked from list.json searchDefault */
-+
-+"use strict";
-+
-+function run_test() {
-+  Assert.ok(!Services.search.isInitialized, "search isn't initialized yet");
-+
-+  run_next_test();
-+}
-+
-+// Override list.json with test data from data/list.json
-+// and check that different locale is working
-+add_task(async function test_listJSONlocale() {
-+  let url = "resource://test/data/";
-+  let resProt = Services.io.getProtocolHandler("resource")
-+                        .QueryInterface(Ci.nsIResProtocolHandler);
-+  resProt.setSubstitution("search-plugins", Services.io.newURI(url));
-+
-+  Services.locale.setAvailableLocales(["de"]);
-+  Services.locale.setRequestedLocales(["de"]);
-+
-+  await asyncInit();
-+
-+  Assert.ok(Services.search.isInitialized, "search initialized");
-+
-+  let sortedEngines = Services.search.getEngines();
-+  Assert.equal(sortedEngines.length, 1, "Should have only one engine");
-+});
-+
-+
-+// Check that switching locale switches search engines
-+add_task(async function test_listJSONlocaleSwitch() {
-+  let promise = waitForSearchNotification("reinit-complete");
-+
-+  Services.locale.setAvailableLocales(["fr"]);
-+  Services.locale.setRequestedLocales(["fr"]);
-+
-+  await promise;
-+
-+  Assert.ok(Services.search.isInitialized, "search initialized");
-+
-+  let sortedEngines = Services.search.getEngines();
-+  Assert.equal(sortedEngines.length, 2, "Should have two engines");
-+});
-+
-+// Check that region overrides apply
-+add_task(async function test_listJSONRegionOverride() {
-+  Services.prefs.setCharPref("browser.search.region", "RU");
-+
-+  await asyncReInit();
-+
-+  Assert.ok(Services.search.isInitialized, "search initialized");
-+
-+  let sortedEngines = Services.search.getEngines();
-+  Assert.equal(sortedEngines.length, 2, "Should have two engines");
-+  Assert.equal(sortedEngines[0].identifier, "engine-chromeicon", "Engine should have been overridden by engine-chromeicon");
-+});
-diff --git a/toolkit/components/search/tests/xpcshell/xpcshell.ini b/toolkit/components/search/tests/xpcshell/xpcshell.ini
---- a/toolkit/components/search/tests/xpcshell/xpcshell.ini
-+++ b/toolkit/components/search/tests/xpcshell/xpcshell.ini
-@@ -35,16 +35,17 @@ support-files =
- [test_bug930456_child.js]
- [test_engine_set_alias.js]
- [test_hasEngineWithURL.js]
- [test_identifiers.js]
- [test_invalid_engine_from_dir.js]
- [test_init_async_multiple.js]
- [test_init_async_multiple_then_sync.js]
- [test_json_cache.js]
-+[test_list_json_locale.js]
- [test_list_json_searchdefault.js]
- [test_list_json_searchorder.js]
- [test_location.js]
- [test_location_error.js]
- [test_location_malformed_json.js]
- [test_location_migrate_countrycode_isUS.js]
- [test_location_migrate_no_countrycode_isUS.js]
- [test_location_migrate_no_countrycode_notUS.js]
-diff --git a/toolkit/mozapps/installer/l10n-repack.py b/toolkit/mozapps/installer/l10n-repack.py
---- a/toolkit/mozapps/installer/l10n-repack.py
-+++ b/toolkit/mozapps/installer/l10n-repack.py
-@@ -10,25 +10,23 @@ directory.
- from mozpack.packager import l10n
- from argparse import ArgumentParser
- import buildconfig
- 
- # Set of files or directories not listed in a chrome.manifest but that are
- # localized.
- NON_CHROME = set([
-     '**/crashreporter*.ini',
--    'searchplugins',
-     'dictionaries',
-     'defaults/profile',
-     'defaults/pref*/*-l10n.js',
-     'update.locale',
-     'updater.ini',
-     'extensions/langpack-*@*',
-     'distribution/extensions/langpack-*@*',
--    'chrome/**/searchplugins/*.xml',
-     '**/multilocale.txt'
- ])
- 
- 
- def valid_extra_l10n(arg):
-     if '=' not in arg:
-         raise ValueError('Invalid value')
-     return tuple(arg.split('=', 1))

+ 0 - 439
bug1240930-253/frg-mozilla/1443208-1only-62a1.patch

@@ -1,439 +0,0 @@
-# HG changeset patch
-# User Nick Alexander <nalexander@mozilla.com>
-# Date 1520553846 28800
-# Node ID fe70510127c52b9ac8c1c9287ffc9c7148c414aa
-# Parent  0db6e65892e98f6fb98579b75d87b44beb65c936
-Bug 1443208 - Pre: Add force flag to GENERATED_FILES. r=ted.mielczarek
-
-The forces on the system are such that I really need to be able to
-FORCE a few RecursiveMake targets in order to make Android and Gradle
-use GENERATED_FILES and LOCALIZED_GENERATED_FILES.  Over time, I hope
-to avoid FORCE, but that time is not now.
-
-MozReview-Commit-ID: 453FpnihSRK
-
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -573,31 +573,38 @@ class RecursiveMakeBackend(CommonBackend
-                     # Android localized resources have special Makefile
-                     # handling.
-                     backend_file.write('%s:: %s\n' % (tier, first_output))
-             for output in outputs:
-                 if output != first_output:
-                     backend_file.write('%s: %s ;\n' % (output, first_output))
-                 backend_file.write('GARBAGE += %s\n' % output)
-             backend_file.write('EXTRA_MDDEPEND_FILES += %s\n' % dep_file)
-+
-+            force = ''
-+            if obj.force:
-+                force = ' FORCE'
-+            elif obj.localized:
-+                force = ' $(if $(IS_LANGUAGE_REPACK),FORCE)'
-+
-             if obj.script:
--                backend_file.write("""{output}: {script}{inputs}{backend}{repack_force}
-+                backend_file.write("""{output}: {script}{inputs}{backend}{force}
- \t$(REPORT_BUILD)
- \t$(call py_action,file_generate,{locale}{script} {method} {output} $(MDDEPDIR)/{dep_file}{inputs}{flags})
- 
- """.format(output=first_output,
-            dep_file=dep_file,
-            inputs=' ' + ' '.join(inputs) if inputs else '',
-            flags=' ' + ' '.join(shell_quote(f) for f in obj.flags) if obj.flags else '',
-            backend=' backend.mk' if obj.flags else '',
-            # Locale repacks repack multiple locales from a single configured objdir,
-            # so standard mtime dependencies won't work properly when the build is re-run
-            # with a different locale as input. IS_LANGUAGE_REPACK will reliably be set
-            # in this situation, so simply force the generation to run in that case.
--           repack_force=' $(if $(IS_LANGUAGE_REPACK),FORCE)' if obj.localized else '',
-+           force=force,
-            locale='--locale=$(AB_CD) ' if obj.localized else '',
-            script=obj.script,
-            method=obj.method))
- 
-         elif isinstance(obj, JARManifest):
-             self._no_skip['libs'].add(backend_file.relobjdir)
-             backend_file.write('JAR_MANIFEST := %s\n' % obj.path.full_path)
- 
-diff --git a/python/mozbuild/mozbuild/frontend/context.py b/python/mozbuild/mozbuild/frontend/context.py
---- a/python/mozbuild/mozbuild/frontend/context.py
-+++ b/python/mozbuild/mozbuild/frontend/context.py
-@@ -926,16 +926,17 @@ BugzillaComponent = TypedNamedTuple('Bug
-                         [('product', unicode), ('component', unicode)])
- SchedulingComponents = ContextDerivedTypedRecord(
-         ('inclusive', TypedList(unicode, StrictOrderingOnAppendList)),
-         ('exclusive', TypedList(unicode, StrictOrderingOnAppendList)))
- 
- GeneratedFilesList = StrictOrderingOnAppendListWithFlagsFactory({
-     'script': unicode,
-     'inputs': list,
-+    'force': bool,
-     'flags': list, })
- 
- 
- class Files(SubContext):
-     """Metadata attached to files.
- 
-     It is common to want to annotate files with metadata, such as which
-     Bugzilla component tracks issues with certain files. This sub-context is
-@@ -1271,18 +1272,18 @@ VARIABLES = {
-         size.
-         """),
- 
-     'GENERATED_FILES': (GeneratedFilesList, list,
-         """Generic generated files.
- 
-         This variable contains a list of files for the build system to
-         generate at export time. The generation method may be declared
--        with optional ``script``, ``inputs`` and ``flags`` attributes on
--        individual entries.
-+        with optional ``script``, ``inputs``, ``flags``, and ``force``
-+        attributes on individual entries.
-         If the optional ``script`` attribute is not present on an entry, it
-         is assumed that rules for generating the file are present in
-         the associated Makefile.in.
- 
-         Example::
- 
-            GENERATED_FILES += ['bar.c', 'baz.c', 'foo.c']
-            bar = GENERATED_FILES['bar.c']
-@@ -1310,16 +1311,21 @@ VARIABLES = {
-           bar = GENERATED_FILES['bar.c']
-           bar.script = 'generate.py:make_bar'
- 
-         The chosen script entry point may optionally return a set of strings,
-         indicating extra files the output depends on.
- 
-         When the ``flags`` attribute is present, the given list of flags is
-         passed as extra arguments following the inputs.
-+
-+        When the ``force`` attribute is present, the file is generated every
-+        build, regardless of whether it is stale.  This is special to the
-+        RecursiveMake backend and intended for special situations only (e.g.,
-+        localization).  Please consult a build peer before using ``force``.
-         """),
- 
-     'DEFINES': (InitializedDefines, dict,
-         """Dictionary of compiler defines to declare.
- 
-         These are passed in to the compiler as ``-Dkey='value'`` for string
-         values, ``-Dkey=value`` for numeric values, or ``-Dkey`` if the
-         value is True. Note that for string values, the outer-level of
-diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py
---- a/python/mozbuild/mozbuild/frontend/data.py
-+++ b/python/mozbuild/mozbuild/frontend/data.py
-@@ -1117,26 +1117,29 @@ class GeneratedFile(ContextDerived):
-     __slots__ = (
-         'script',
-         'method',
-         'outputs',
-         'inputs',
-         'flags',
-         'required_for_compile',
-         'localized',
-+        'force',
-     )
- 
--    def __init__(self, context, script, method, outputs, inputs, flags=(), localized=False):
-+    def __init__(self, context, script, method, outputs, inputs,
-+                 flags=(), localized=False, force=False):
-         ContextDerived.__init__(self, context)
-         self.script = script
-         self.method = method
-         self.outputs = outputs if isinstance(outputs, tuple) else (outputs,)
-         self.inputs = inputs
-         self.flags = flags
-         self.localized = localized
-+        self.force = force
- 
-         suffixes = (
-             '.c',
-             '.cpp',
-             '.h',
-             '.inc',
-             '.py',
-             '.rs',
-diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
---- a/python/mozbuild/mozbuild/frontend/emitter.py
-+++ b/python/mozbuild/mozbuild/frontend/emitter.py
-@@ -1386,17 +1386,17 @@ class TreeMetadataEmitter(LoggingMixin):
-                     if (isinstance(p, SourcePath) and
-                             not os.path.exists(p.full_path)):
-                         raise SandboxValidationError(
-                             'Input for generating %s does not exist: %s'
-                             % (f, p.full_path), context)
-                     inputs.append(p)
- 
-                 yield GeneratedFile(context, script, method, outputs, inputs,
--                                    flags.flags, localized=localized)
-+                                    flags.flags, localized=localized, force=flags.force)
- 
-     def _process_test_manifests(self, context):
-         for prefix, info in TEST_MANIFESTS.items():
-             for path, manifest in context.get('%s_MANIFESTS' % prefix, []):
-                 for obj in self._process_test_manifest(context, info, path, manifest):
-                     yield obj
- 
-         for flavor in REFTEST_FLAVORS:
-diff --git a/python/mozbuild/mozbuild/test/backend/data/generated-files/foo-data b/python/mozbuild/mozbuild/test/backend/data/generated-files-force/foo-data
-copy from python/mozbuild/mozbuild/test/backend/data/generated-files/foo-data
-copy to python/mozbuild/mozbuild/test/backend/data/generated-files-force/foo-data
-diff --git a/python/mozbuild/mozbuild/test/backend/data/generated-files/generate-bar.py b/python/mozbuild/mozbuild/test/backend/data/generated-files-force/generate-bar.py
-copy from python/mozbuild/mozbuild/test/backend/data/generated-files/generate-bar.py
-copy to python/mozbuild/mozbuild/test/backend/data/generated-files-force/generate-bar.py
-diff --git a/python/mozbuild/mozbuild/test/backend/data/generated-files/generate-foo.py b/python/mozbuild/mozbuild/test/backend/data/generated-files-force/generate-foo.py
-copy from python/mozbuild/mozbuild/test/backend/data/generated-files/generate-foo.py
-copy to python/mozbuild/mozbuild/test/backend/data/generated-files-force/generate-foo.py
-diff --git a/python/mozbuild/mozbuild/test/backend/data/generated-files/moz.build b/python/mozbuild/mozbuild/test/backend/data/generated-files-force/moz.build
-copy from python/mozbuild/mozbuild/test/backend/data/generated-files/moz.build
-copy to python/mozbuild/mozbuild/test/backend/data/generated-files-force/moz.build
---- a/python/mozbuild/mozbuild/test/backend/data/generated-files/moz.build
-+++ b/python/mozbuild/mozbuild/test/backend/data/generated-files-force/moz.build
-@@ -1,12 +1,14 @@
- # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
- # Any copyright is dedicated to the Public Domain.
- # http://creativecommons.org/publicdomain/zero/1.0/
- 
- GENERATED_FILES += [ 'bar.c', 'foo.c', 'quux.c' ]
- 
- bar = GENERATED_FILES['bar.c']
- bar.script = 'generate-bar.py:baz'
-+bar.force = True
- 
- foo = GENERATED_FILES['foo.c']
- foo.script = 'generate-foo.py'
- foo.inputs = ['foo-data']
-+foo.force = False
-diff --git a/python/mozbuild/mozbuild/test/backend/data/localized-generated-files/en-US/localized-input b/python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/en-US/localized-input
-copy from python/mozbuild/mozbuild/test/backend/data/localized-generated-files/en-US/localized-input
-copy to python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/en-US/localized-input
-diff --git a/python/mozbuild/mozbuild/test/backend/data/localized-generated-files/foo-data b/python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/foo-data
-copy from python/mozbuild/mozbuild/test/backend/data/localized-generated-files/foo-data
-copy to python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/foo-data
-diff --git a/python/mozbuild/mozbuild/test/backend/data/localized-generated-files/generate-foo.py b/python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/generate-foo.py
-copy from python/mozbuild/mozbuild/test/backend/data/localized-generated-files/generate-foo.py
-copy to python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/generate-foo.py
-diff --git a/python/mozbuild/mozbuild/test/backend/data/localized-generated-files/moz.build b/python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/moz.build
-copy from python/mozbuild/mozbuild/test/backend/data/localized-generated-files/moz.build
-copy to python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/moz.build
---- a/python/mozbuild/mozbuild/test/backend/data/localized-generated-files/moz.build
-+++ b/python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/moz.build
-@@ -6,10 +6,17 @@ LOCALIZED_GENERATED_FILES += [ 'foo.xyz'
- 
- foo = LOCALIZED_GENERATED_FILES['foo.xyz']
- foo.script = 'generate-foo.py'
- foo.inputs = [
-     'en-US/localized-input',
-     'non-localized-input',
- ]
- 
--# Also check that using it in LOCALIZED_FILES does the right thing.
--LOCALIZED_FILES += [ '!foo.xyz' ]
-+LOCALIZED_GENERATED_FILES += [ 'abc.xyz' ]
-+
-+abc = LOCALIZED_GENERATED_FILES['abc.xyz']
-+abc.script = 'generate-foo.py'
-+abc.inputs = [
-+    'en-US/localized-input',
-+    'non-localized-input',
-+]
-+abc.force = True
-diff --git a/python/mozbuild/mozbuild/test/backend/data/localized-generated-files/non-localized-input b/python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/non-localized-input
-copy from python/mozbuild/mozbuild/test/backend/data/localized-generated-files/non-localized-input
-copy to python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/non-localized-input
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-@@ -413,16 +413,46 @@ class TestRecursiveMakeBackend(BackendTe
-             'export:: quux.c',
-             'GARBAGE += quux.c',
-             'EXTRA_MDDEPEND_FILES += quux.c.pp',
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-+    def test_generated_files_force(self):
-+        """Ensure GENERATED_FILES with .force is handled properly."""
-+        env = self._consume('generated-files-force', RecursiveMakeBackend)
-+
-+        backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-+        lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
-+
-+        expected = [
-+            'export:: bar.c',
-+            'GARBAGE += bar.c',
-+            'EXTRA_MDDEPEND_FILES += bar.c.pp',
-+            'bar.c: %s/generate-bar.py FORCE' % env.topsrcdir,
-+            '$(REPORT_BUILD)',
-+            '$(call py_action,file_generate,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp)' % env.topsrcdir,
-+            '',
-+            'export:: foo.c',
-+            'GARBAGE += foo.c',
-+            'EXTRA_MDDEPEND_FILES += foo.c.pp',
-+            'foo.c: %s/generate-foo.py $(srcdir)/foo-data' % (env.topsrcdir),
-+            '$(REPORT_BUILD)',
-+            '$(call py_action,file_generate,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(srcdir)/foo-data)' % (env.topsrcdir),
-+            '',
-+            'export:: quux.c',
-+            'GARBAGE += quux.c',
-+            'EXTRA_MDDEPEND_FILES += quux.c.pp',
-+        ]
-+
-+        self.maxDiff = None
-+        self.assertEqual(lines, expected)
-+
-     def test_localized_generated_files(self):
-         """Ensure LOCALIZED_GENERATED_FILES is handled properly."""
-         env = self._consume('localized-generated-files', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
-@@ -437,16 +467,43 @@ class TestRecursiveMakeBackend(BackendTe
-             'LOCALIZED_FILES_0_DEST = $(FINAL_TARGET)/',
-             'LOCALIZED_FILES_0_TARGET := libs',
-             'INSTALL_TARGETS += LOCALIZED_FILES_0',
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-+    def test_localized_generated_files_force(self):
-+        """Ensure LOCALIZED_GENERATED_FILES with .force is handled properly."""
-+        env = self._consume('localized-generated-files-force', RecursiveMakeBackend)
-+
-+        backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-+        lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
-+
-+        expected = [
-+            'libs:: foo.xyz',
-+            'GARBAGE += foo.xyz',
-+            'EXTRA_MDDEPEND_FILES += foo.xyz.pp',
-+            'foo.xyz: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-+            '$(REPORT_BUILD)',
-+            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '',
-+            'libs:: abc.xyz',
-+            'GARBAGE += abc.xyz',
-+            'EXTRA_MDDEPEND_FILES += abc.xyz.pp',
-+            'abc.xyz: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input FORCE' % env.topsrcdir,
-+            '$(REPORT_BUILD)',
-+            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '',
-+        ]
-+
-+        self.maxDiff = None
-+        self.assertEqual(lines, expected)
-+
-     def test_localized_generated_files_AB_CD(self):
-         """Ensure LOCALIZED_GENERATED_FILES is handled properly
-         when {AB_CD} and {AB_rCD} are used."""
-         env = self._consume('localized-generated-files-AB_CD', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-diff --git a/python/mozbuild/mozbuild/test/frontend/data/generated-files/moz.build b/python/mozbuild/mozbuild/test/frontend/data/generated-files-force/moz.build
-copy from python/mozbuild/mozbuild/test/frontend/data/generated-files/moz.build
-copy to python/mozbuild/mozbuild/test/frontend/data/generated-files-force/moz.build
---- a/python/mozbuild/mozbuild/test/frontend/data/generated-files/moz.build
-+++ b/python/mozbuild/mozbuild/test/frontend/data/generated-files-force/moz.build
-@@ -1,5 +1,7 @@
- # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
- # Any copyright is dedicated to the Public Domain.
- # http://creativecommons.org/publicdomain/zero/1.0/
- 
- GENERATED_FILES += [ 'bar.c', 'foo.c', ('xpidllex.py', 'xpidlyacc.py'), ]
-+GENERATED_FILES['bar.c'].force = True
-+GENERATED_FILES['foo.c'].force = False
-diff --git a/python/mozbuild/mozbuild/test/frontend/data/localized-generated-files/moz.build b/python/mozbuild/mozbuild/test/frontend/data/localized-generated-files-force/moz.build
-copy from python/mozbuild/mozbuild/test/frontend/data/localized-generated-files/moz.build
-copy to python/mozbuild/mozbuild/test/frontend/data/localized-generated-files-force/moz.build
---- a/python/mozbuild/mozbuild/test/frontend/data/localized-generated-files/moz.build
-+++ b/python/mozbuild/mozbuild/test/frontend/data/localized-generated-files-force/moz.build
-@@ -1,5 +1,6 @@
- # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
- # Any copyright is dedicated to the Public Domain.
- # http://creativecommons.org/publicdomain/zero/1.0/
- 
- LOCALIZED_GENERATED_FILES += [ 'abc.ini', ('bar', 'baz') ]
-+LOCALIZED_GENERATED_FILES['abc.ini'].force = True
-diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
---- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
-+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
-@@ -446,34 +446,43 @@ class TestEmitterBasic(unittest.TestCase
-         maxDiff = self.maxDiff
-         self.maxDiff = None
-         self.assertEqual(passthru.variables,
-                          {'AS': 'yasm',
-                           'AS_DASH_C_FLAG': '',
-                           'ASOUTOPTION': '-o '})
-         self.maxDiff = maxDiff
- 
--
-     def test_generated_files(self):
-         reader = self.reader('generated-files')
-         objs = self.read_topsrcdir(reader)
- 
-         self.assertEqual(len(objs), 3)
-         for o in objs:
-             self.assertIsInstance(o, GeneratedFile)
-             self.assertFalse(o.localized)
-+            self.assertFalse(o.force)
- 
-         expected = ['bar.c', 'foo.c', ('xpidllex.py', 'xpidlyacc.py'), ]
-         for o, f in zip(objs, expected):
-             expected_filename = f if isinstance(f, tuple) else (f,)
-             self.assertEqual(o.outputs, expected_filename)
-             self.assertEqual(o.script, None)
-             self.assertEqual(o.method, None)
-             self.assertEqual(o.inputs, [])
- 
-+    def test_generated_files_force(self):
-+        reader = self.reader('generated-files-force')
-+        objs = self.read_topsrcdir(reader)
-+
-+        self.assertEqual(len(objs), 3)
-+        for o in objs:
-+            self.assertIsInstance(o, GeneratedFile)
-+            self.assertEqual(o.force, 'bar.c' in o.outputs)
-+
-     def test_localized_generated_files(self):
-         reader = self.reader('localized-generated-files')
-         objs = self.read_topsrcdir(reader)
- 
-         self.assertEqual(len(objs), 2)
-         for o in objs:
-             self.assertIsInstance(o, GeneratedFile)
-             self.assertTrue(o.localized)
-@@ -482,16 +491,26 @@ class TestEmitterBasic(unittest.TestCase
-         expected = ['abc.ini', ('bar', 'baz'), ]
-         for o, f in zip(objs, expected):
-             expected_filename = f if isinstance(f, tuple) else (f,)
-             self.assertEqual(o.outputs, expected_filename)
-             self.assertEqual(o.script, None)
-             self.assertEqual(o.method, None)
-             self.assertEqual(o.inputs, [])
- 
-+    def test_localized_generated_files_force(self):
-+        reader = self.reader('localized-generated-files-force')
-+        objs = self.read_topsrcdir(reader)
-+
-+        self.assertEqual(len(objs), 2)
-+        for o in objs:
-+            self.assertIsInstance(o, GeneratedFile)
-+            self.assertTrue(o.localized)
-+            self.assertEqual(o.force, 'abc.ini' in o.outputs)
-+
-     def test_localized_files_from_generated(self):
-         """Test that using LOCALIZED_GENERATED_FILES and then putting the output in
-         LOCALIZED_FILES as an objdir path works.
-         """
-         reader = self.reader('localized-files-from-generated')
-         objs = self.read_topsrcdir(reader)
- 
-         self.assertEqual(len(objs), 2)
-

+ 0 - 160
bug1240930-253/frg-mozilla/1449965-61a1.patch

@@ -1,160 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1524122217 25200
-# Node ID 9c246c15f12a2eb0ed20188b2c8c504baf5f1aec
-# Parent  573a198b7fdf076e27eb1f468162df101246d7b3
-Bug 1449965 - Output directories during the build as we compile object files. r=ted
-
-MozReview-Commit-ID: K4RrObGHXIC
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -31,17 +31,17 @@ ifdef REBUILD_CHECK
- REPORT_BUILD = $(info $(shell $(PYTHON) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^))
- REPORT_BUILD_VERBOSE = $(REPORT_BUILD)
- else
- REPORT_BUILD = $(info $(notdir $@))
- 
- ifdef BUILD_VERBOSE_LOG
- REPORT_BUILD_VERBOSE = $(REPORT_BUILD)
- else
--REPORT_BUILD_VERBOSE =
-+REPORT_BUILD_VERBOSE = $(call BUILDSTATUS,BUILD_VERBOSE $(relativesrcdir))
- endif
- 
- endif
- 
- EXEC			= exec
- 
- # ELOG prints out failed command when building silently (gmake -s). Pymake
- # prints out failed commands anyway, so ELOG just makes things worse by
-diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py
---- a/python/mozbuild/mozbuild/controller/building.py
-+++ b/python/mozbuild/mozbuild/controller/building.py
-@@ -92,17 +92,17 @@ If you did not modify any test files, it
- and proceed with running tests. To do this run:
- 
-  $ touch {clobber_file}
- '''.splitlines()])
- 
- 
- 
- BuildOutputResult = namedtuple('BuildOutputResult',
--    ('warning', 'state_changed', 'for_display'))
-+    ('warning', 'state_changed', 'message'))
- 
- 
- class TierStatus(object):
-     """Represents the state and progress of tier traversal.
- 
-     The build system is organized into linear phases called tiers. Each tier
-     executes in the order it was defined, 1 at a time.
-     """
-@@ -224,16 +224,17 @@ class BuildMonitor(MozbuildObject):
-             self.warnings_database.insert(warning)
-             # Make a copy so mutations don't impact other database.
-             self.instance_warnings.insert(warning.copy())
- 
-         self._warnings_collector = WarningsCollector(on_warning,
-                                                      objdir=self.topobjdir)
- 
-         self.build_objects = []
-+        self.build_dirs = set()
- 
-     def start(self):
-         """Record the start of the build."""
-         self.start_time = time.time()
-         self._finder_start_cpu = self._get_finder_cpu_usage()
- 
-     def start_resource_recording(self):
-         # This should be merged into start() once bug 892342 lands.
-@@ -250,20 +251,21 @@ class BuildMonitor(MozbuildObject):
- 
-         In this named tuple, warning will be an object describing a new parsed
-         warning. Otherwise it will be None.
- 
-         state_changed indicates whether the build system changed state with
-         this line. If the build system changed state, the caller may want to
-         query this instance for the current state in order to update UI, etc.
- 
--        for_display is a boolean indicating whether the line is relevant to the
--        user. This is typically used to filter whether the line should be
--        presented to the user.
-+        message is either None, or the content of a message to be
-+        displayed to the user.
-         """
-+        message = None
-+
-         if line.startswith('BUILDSTATUS'):
-             args = line.split()[1:]
- 
-             action = args.pop(0)
-             update_needed = True
- 
-             if action == 'TIERS':
-                 self.tiers.set_tiers(args)
-@@ -272,29 +274,36 @@ class BuildMonitor(MozbuildObject):
-                 tier = args[0]
-                 self.tiers.begin_tier(tier)
-             elif action == 'TIER_FINISH':
-                 tier, = args
-                 self.tiers.finish_tier(tier)
-             elif action == 'OBJECT_FILE':
-                 self.build_objects.append(args[0])
-                 update_needed = False
-+            elif action == 'BUILD_VERBOSE':
-+                build_dir = args[0]
-+                if build_dir not in self.build_dirs:
-+                    self.build_dirs.add(build_dir)
-+                    message = build_dir
-+                update_needed = False
-             else:
-                 raise Exception('Unknown build status: %s' % action)
- 
--            return BuildOutputResult(None, update_needed, False)
-+            return BuildOutputResult(None, update_needed, message)
- 
-         warning = None
- 
-         try:
-             warning = self._warnings_collector.process_line(line)
-+            message = line
-         except:
-             pass
- 
--        return BuildOutputResult(warning, False, True)
-+        return BuildOutputResult(warning, False, message)
- 
-     def stop_resource_recording(self):
-         if self._resources_started:
-             self.resources.stop()
- 
-         self._resources_started = False
- 
-     def finish(self, record_usage=True):
-@@ -661,20 +670,20 @@ class BuildOutputManager(OutputManager):
- 
-         # Ensure the resource monitor is stopped because leaving it running
-         # could result in the process hanging on exit because the resource
-         # collection child process hasn't been told to stop.
-         self.monitor.stop_resource_recording()
- 
- 
-     def on_line(self, line):
--        warning, state_changed, relevant = self.monitor.on_line(line)
-+        warning, state_changed, message = self.monitor.on_line(line)
- 
--        if relevant:
--            self.log(logging.INFO, 'build_output', {'line': line}, '{line}')
-+        if message:
-+            self.log(logging.INFO, 'build_output', {'line': message}, '{line}')
-         elif state_changed:
-             have_handler = hasattr(self, 'handler')
-             if have_handler:
-                 self.handler.acquire()
-             try:
-                 self.refresh()
-             finally:
-                 if have_handler:
-

+ 0 - 143
bug1240930-253/frg-mozilla/1454912-2no1-62a1.patch

@@ -1,143 +0,0 @@
-# HG changeset patch
-# User Mike Shal <mshal@mozilla.com>
-# Date 1525899199 14400
-# Node ID 82c74467f638711b16996f2a0dca28a597f32a0d
-# Parent  4dbe6c1bea4db5f0ae77a3487328c32ec240a5d7
-Bug 1454912 - Only output dependencies for GENERATED_FILES with scripts; r=nalexander
-
-Some GENERATED_FILES entries don't have .scripts associated with them
-(notably midl on Windows builds). In this case, we don't want to
-generate dependencies automatically since they will be handled by the
-Makefiles.
-
-MozReview-Commit-ID: AXmN2Unk9AY
-
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -562,38 +562,38 @@ class RecursiveMakeBackend(CommonBackend
-                 else:
-                     inputs = [self._pretty_path(f, backend_file) for f in obj.inputs]
-             else:
-                 inputs = []
- 
-             if needs_AB_rCD:
-                 backend_file.write_once('include $(topsrcdir)/config/AB_rCD.mk\n')
- 
--            # If we're doing this during export that means we need it during
--            # compile, but if we have an artifact build we don't run compile,
--            # so we can skip it altogether or let the rule run as the result of
--            # something depending on it.
--            if tier != 'export' or not self.environment.is_artifact_build:
--                if not needs_AB_rCD:
--                    # Android localized resources have special Makefile
--                    # handling.
--                    backend_file.write('%s:: %s\n' % (tier, first_output))
--            for output in outputs:
--                if output != first_output:
--                    backend_file.write('%s: %s ;\n' % (output, first_output))
--                backend_file.write('GARBAGE += %s\n' % output)
--            backend_file.write('EXTRA_MDDEPEND_FILES += %s\n' % dep_file)
--
-             force = ''
-             if obj.force:
-                 force = ' FORCE'
-             elif obj.localized:
-                 force = ' $(if $(IS_LANGUAGE_REPACK),FORCE)'
- 
-             if obj.script:
-+                # If we're doing this during export that means we need it during
-+                # compile, but if we have an artifact build we don't run compile,
-+                # so we can skip it altogether or let the rule run as the result of
-+                # something depending on it.
-+                if tier != 'export' or not self.environment.is_artifact_build:
-+                    if not needs_AB_rCD:
-+                        # Android localized resources have special Makefile
-+                        # handling.
-+                        backend_file.write('%s:: %s\n' % (tier, first_output))
-+                for output in outputs:
-+                    if output != first_output:
-+                        backend_file.write('%s: %s ;\n' % (output, first_output))
-+                    backend_file.write('GARBAGE += %s\n' % output)
-+                backend_file.write('EXTRA_MDDEPEND_FILES += %s\n' % dep_file)
-+
-                 backend_file.write("""{output}: {script}{inputs}{backend}{force}
- \t$(REPORT_BUILD)
- \t$(call py_action,file_generate,{locale}{script} {method} {output} $(MDDEPDIR)/{dep_file}{inputs}{flags})
- 
- """.format(output=first_output,
-            dep_file=dep_file,
-            inputs=' ' + ' '.join(inputs) if inputs else '',
-            flags=' ' + ' '.join(shell_quote(f) for f in obj.flags) if obj.flags else '',
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-@@ -405,19 +405,16 @@ class TestRecursiveMakeBackend(BackendTe
-             '',
-             'export:: foo.c',
-             'GARBAGE += foo.c',
-             'EXTRA_MDDEPEND_FILES += foo.c.pp',
-             'foo.c: %s/generate-foo.py $(srcdir)/foo-data' % (env.topsrcdir),
-             '$(REPORT_BUILD)',
-             '$(call py_action,file_generate,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(srcdir)/foo-data)' % (env.topsrcdir),
-             '',
--            'export:: quux.c',
--            'GARBAGE += quux.c',
--            'EXTRA_MDDEPEND_FILES += quux.c.pp',
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-     def test_generated_files_force(self):
-         """Ensure GENERATED_FILES with .force is handled properly."""
-         env = self._consume('generated-files-force', RecursiveMakeBackend)
-@@ -435,19 +432,16 @@ class TestRecursiveMakeBackend(BackendTe
-             '',
-             'export:: foo.c',
-             'GARBAGE += foo.c',
-             'EXTRA_MDDEPEND_FILES += foo.c.pp',
-             'foo.c: %s/generate-foo.py $(srcdir)/foo-data' % (env.topsrcdir),
-             '$(REPORT_BUILD)',
-             '$(call py_action,file_generate,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(srcdir)/foo-data)' % (env.topsrcdir),
-             '',
--            'export:: quux.c',
--            'GARBAGE += quux.c',
--            'EXTRA_MDDEPEND_FILES += quux.c.pp',
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-     def test_localized_generated_files(self):
-         """Ensure LOCALIZED_GENERATED_FILES is handled properly."""
-         env = self._consume('localized-generated-files', RecursiveMakeBackend)
-@@ -544,28 +538,16 @@ class TestRecursiveMakeBackend(BackendTe
-         self.assertIn('mozilla/mozilla2.h', m)
-         self.assertIn('mozilla/dom/dom2.h', m)
-         self.assertIn('mozilla/dom/dom3.h', m)
-         # EXPORTS files that are also GENERATED_FILES should be handled as
-         # INSTALL_TARGETS.
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
-         expected = [
--            'export:: bar.h',
--            'GARBAGE += bar.h',
--            'EXTRA_MDDEPEND_FILES += bar.h.pp',
--            'export:: mozilla2.h',
--            'GARBAGE += mozilla2.h',
--            'EXTRA_MDDEPEND_FILES += mozilla2.h.pp',
--            'export:: dom2.h',
--            'GARBAGE += dom2.h',
--            'EXTRA_MDDEPEND_FILES += dom2.h.pp',
--            'export:: dom3.h',
--            'GARBAGE += dom3.h',
--            'EXTRA_MDDEPEND_FILES += dom3.h.pp',
-             'dist_include_FILES += bar.h',
-             'dist_include_DEST := $(DEPTH)/dist/include/',
-             'dist_include_TARGET := export',
-             'INSTALL_TARGETS += dist_include',
-             'dist_include_mozilla_FILES += mozilla2.h',
-             'dist_include_mozilla_DEST := $(DEPTH)/dist/include/mozilla',
-             'dist_include_mozilla_TARGET := export',
-             'INSTALL_TARGETS += dist_include_mozilla',

+ 0 - 412
bug1240930-253/frg-mozilla/1454912-3-62a1.patch

@@ -1,412 +0,0 @@
-# HG changeset patch
-# User Mike Shal <mshal@mozilla.com>
-# Date 1525868671 14400
-# Node ID 1eb04a9bfb7a82eb6fac5e29be7c6b03999d9361
-# Parent  82c74467f638711b16996f2a0dca28a597f32a0d
-Bug 1454912 - Use a .stub file as the target for all GENERATED_FILES rules; r=nalexander
-
-The make backend was treating the first output of a GENERATED_FILES rule
-specially, since it was the target of the rule containing the script
-invocation. We want the outputs of GENERATED_FILES rules to be
-FileAvoidWrite so that we avoid triggering downstream rules if the
-outputs are unchanged, but if the target of the script invocation is
-FileAvoidWrite, then make may continually re-run the script during a
-no-op build.
-
-The solution here is to use a stub file as the target of the script
-invocation which will always be touched when the script runs. Since
-nothing else in the build depends on the stub, we don't need to
-FileAvoidWrite it. All actual outputs of the script can be
-FileAvoidWrite, and make can properly avoid work for files that haven't
-changed.
-
-MozReview-Commit-ID: 3GejZw2tpqu
-
-diff --git a/CLOBBER b/CLOBBER
---- a/CLOBBER
-+++ b/CLOBBER
-@@ -17,9 +17,9 @@
- #
- # Modifying this file will now automatically clobber the buildbot machines \o/
- #
- 
- # Are you updating CLOBBER because you think it's needed for your WebIDL
- # changes to stick? As of bug 928195, this shouldn't be necessary! Please
- # don't change CLOBBER for WebIDL changes any more.
- 
--Bug 1371485 - Moving gyp requires a clobber.
-+Bug 1454912 - Changed out GENERATED_FILES are handled in the RecursiveMake backend
-diff --git a/config/config.mk b/config/config.mk
---- a/config/config.mk
-+++ b/config/config.mk
-@@ -24,16 +24,19 @@ topsrcdir	= $(DEPTH)
- endif
- 
- ifndef INCLUDED_AUTOCONF_MK
- include $(DEPTH)/config/autoconf.mk
- endif
- 
- -include $(DEPTH)/.mozconfig.mk
- 
-+# MDDEPDIR is the subdirectory where dependency files are stored
-+MDDEPDIR := .deps
-+
- ifndef EXTERNALLY_MANAGED_MAKE_FILE
- # Import the automatically generated backend file. If this file doesn't exist,
- # the backend hasn't been properly configured. We want this to be a fatal
- # error, hence not using "-include".
- ifndef STANDALONE_MAKEFILE
- GLOBAL_DEPS += backend.mk
- include backend.mk
- endif
-@@ -429,19 +432,16 @@ endif # ! WINNT
- 
- # Make sure any compiled classes work with at least JVM 1.4
- JAVAC_FLAGS += -source 1.4
- 
- ifdef MOZ_DEBUG
- JAVAC_FLAGS += -g
- endif
- 
--# MDDEPDIR is the subdirectory where dependency files are stored
--MDDEPDIR := .deps
--
- # autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
- # this file
- OBJ_SUFFIX := $(_OBJ_SUFFIX)
- 
- OBJS_VAR_SUFFIX := OBJS
- 
- # PGO builds with GCC build objects with instrumentation in a first pass,
- # then objects optimized, without instrumentation, in a second pass. If
-diff --git a/python/mozbuild/mozbuild/action/file_generate.py b/python/mozbuild/mozbuild/action/file_generate.py
---- a/python/mozbuild/mozbuild/action/file_generate.py
-+++ b/python/mozbuild/mozbuild/action/file_generate.py
-@@ -28,16 +28,18 @@ def main(argv):
-     parser.add_argument('python_script', metavar='python-script', type=str,
-                         help='The Python script to run')
-     parser.add_argument('method_name', metavar='method-name', type=str,
-                         help='The method of the script to invoke')
-     parser.add_argument('output_file', metavar='output-file', type=str,
-                         help='The file to generate')
-     parser.add_argument('dep_file', metavar='dep-file', type=str,
-                         help='File to write any additional make dependencies to')
-+    parser.add_argument('dep_target', metavar='dep-target', type=str,
-+                        help='Make target to use in the dependencies file')
-     parser.add_argument('additional_arguments', metavar='arg',
-                         nargs=argparse.REMAINDER,
-                         help="Additional arguments to the script's main() method")
- 
-     args = parser.parse_args(argv)
- 
-     kwargs = {}
-     if args.locale:
-@@ -90,17 +92,17 @@ def main(argv):
-                 # the script.
-                 deps |= set(iter_modules_in_path(buildconfig.topsrcdir,
-                                                  buildconfig.topobjdir))
-                 # Add dependencies on any buildconfig items that were accessed
-                 # by the script.
-                 deps |= set(buildconfig.get_dependencies())
- 
-                 mk = Makefile()
--                mk.create_rule([args.output_file]).add_dependencies(deps)
-+                mk.create_rule([args.dep_target]).add_dependencies(deps)
-                 with FileAvoidWrite(args.dep_file) as dep_file:
-                     mk.dump(dep_file)
-         # Even when our file's contents haven't changed, we want to update
-         # the file's mtime so make knows this target isn't still older than
-         # whatever prerequisite caused it to be built this time around.
-         try:
-             os.utime(args.output_file, None)
-         except:
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -528,16 +528,20 @@ class RecursiveMakeBackend(CommonBackend
-                 try:
-                     outputs.append(o.format(**substs))
-                 except KeyError as e:
-                     raise ValueError('%s not in %s is not a valid substitution in %s'
-                                      % (e.args[0], ', '.join(sorted(substs.keys())), o))
- 
-             first_output = outputs[0]
-             dep_file = "%s.pp" % first_output
-+            # The stub target file needs to go in MDDEPDIR so that it doesn't
-+            # get written into generated Android resource directories, breaking
-+            # Gradle tooling and/or polluting the Android packages.
-+            stub_file = "$(MDDEPDIR)/%s.stub" % first_output
- 
-             if obj.inputs:
-                 if obj.localized:
-                     # Localized generated files can have locale-specific inputs, which are
-                     # indicated by paths starting with `en-US/` or containing `locales/en-US/`.
-                     def srcpath(p):
-                         if 'locales/en-US' in p:
-                             # We need an "absolute source path" relative to
-@@ -572,28 +576,30 @@ class RecursiveMakeBackend(CommonBackend
-                 # If we're doing this during export that means we need it during
-                 # compile, but if we have an artifact build we don't run compile,
-                 # so we can skip it altogether or let the rule run as the result of
-                 # something depending on it.
-                 if tier != 'export' or not self.environment.is_artifact_build:
-                     if not needs_AB_rCD:
-                         # Android localized resources have special Makefile
-                         # handling.
--                        backend_file.write('%s:: %s\n' % (tier, first_output))
-+                        backend_file.write('%s:: %s\n' % (tier, stub_file))
-                 for output in outputs:
--                    if output != first_output:
--                        backend_file.write('%s: %s ;\n' % (output, first_output))
-+                    backend_file.write('%s: %s ;\n' % (output, stub_file))
-                     backend_file.write('GARBAGE += %s\n' % output)
-+                backend_file.write('GARBAGE += %s\n' % stub_file)
-                 backend_file.write('EXTRA_MDDEPEND_FILES += %s\n' % dep_file)
- 
--                backend_file.write("""{output}: {script}{inputs}{backend}{force}
-+                backend_file.write("""{stub}: {script}{inputs}{backend}{force}
- \t$(REPORT_BUILD)
--\t$(call py_action,file_generate,{locale}{script} {method} {output} $(MDDEPDIR)/{dep_file}{inputs}{flags})
-+\t$(call py_action,file_generate,{locale}{script} {method} {output} $(MDDEPDIR)/{dep_file} {stub}{inputs}{flags})
-+\t@$(TOUCH) $@
- 
--""".format(output=first_output,
-+""".format(stub=stub_file,
-+           output=first_output,
-            dep_file=dep_file,
-            inputs=' ' + ' '.join(inputs) if inputs else '',
-            flags=' ' + ' '.join(shell_quote(f) for f in obj.flags) if obj.flags else '',
-            backend=' backend.mk' if obj.flags else '',
-            # Locale repacks repack multiple locales from a single configured objdir,
-            # so standard mtime dependencies won't work properly when the build is re-run
-            # with a different locale as input. IS_LANGUAGE_REPACK will reliably be set
-            # in this situation, so simply force the generation to run in that case.
-diff --git a/python/mozbuild/mozbuild/backend/tup.py b/python/mozbuild/mozbuild/backend/tup.py
---- a/python/mozbuild/mozbuild/backend/tup.py
-+++ b/python/mozbuild/mozbuild/backend/tup.py
-@@ -276,16 +276,17 @@ class TupOnly(CommonBackend, PartialBack
-         if obj.script and obj.method and obj.relobjdir not in skip_directories:
-             backend_file.export_shell()
-             cmd = self._py_action('file_generate')
-             cmd.extend([
-                 obj.script,
-                 obj.method,
-                 obj.outputs[0],
-                 '%s.pp' % obj.outputs[0], # deps file required
-+                'unused', # deps target is required
-             ])
-             full_inputs = [f.full_path for f in obj.inputs]
-             cmd.extend(full_inputs)
-             cmd.extend(shell_quote(f) for f in obj.flags)
- 
-             outputs = []
-             outputs.extend(obj.outputs)
-             outputs.append('%s.pp' % obj.outputs[0])
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-@@ -391,76 +391,91 @@ class TestRecursiveMakeBackend(BackendTe
-     def test_generated_files(self):
-         """Ensure GENERATED_FILES is handled properly."""
-         env = self._consume('generated-files', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
--            'export:: bar.c',
-+            'export:: $(MDDEPDIR)/bar.c.stub',
-+            'bar.c: $(MDDEPDIR)/bar.c.stub ;',
-             'GARBAGE += bar.c',
-+            'GARBAGE += $(MDDEPDIR)/bar.c.stub',
-             'EXTRA_MDDEPEND_FILES += bar.c.pp',
--            'bar.c: %s/generate-bar.py' % env.topsrcdir,
-+            '$(MDDEPDIR)/bar.c.stub: %s/generate-bar.py' % env.topsrcdir,
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp)' % env.topsrcdir,
-+            '$(call py_action,file_generate,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp $(MDDEPDIR)/bar.c.stub)' % env.topsrcdir,
-+            '@$(TOUCH) $@',
-             '',
--            'export:: foo.c',
-+            'export:: $(MDDEPDIR)/foo.c.stub',
-+            'foo.c: $(MDDEPDIR)/foo.c.stub ;',
-             'GARBAGE += foo.c',
-+            'GARBAGE += $(MDDEPDIR)/foo.c.stub',
-             'EXTRA_MDDEPEND_FILES += foo.c.pp',
--            'foo.c: %s/generate-foo.py $(srcdir)/foo-data' % (env.topsrcdir),
-+            '$(MDDEPDIR)/foo.c.stub: %s/generate-foo.py $(srcdir)/foo-data' % (env.topsrcdir),
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(srcdir)/foo-data)' % (env.topsrcdir),
-+            '$(call py_action,file_generate,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(MDDEPDIR)/foo.c.stub $(srcdir)/foo-data)' % (env.topsrcdir),
-+            '@$(TOUCH) $@',
-             '',
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-     def test_generated_files_force(self):
-         """Ensure GENERATED_FILES with .force is handled properly."""
-         env = self._consume('generated-files-force', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
--            'export:: bar.c',
-+            'export:: $(MDDEPDIR)/bar.c.stub',
-+            'bar.c: $(MDDEPDIR)/bar.c.stub ;',
-             'GARBAGE += bar.c',
-+            'GARBAGE += $(MDDEPDIR)/bar.c.stub',
-             'EXTRA_MDDEPEND_FILES += bar.c.pp',
--            'bar.c: %s/generate-bar.py FORCE' % env.topsrcdir,
-+            '$(MDDEPDIR)/bar.c.stub: %s/generate-bar.py FORCE' % env.topsrcdir,
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp)' % env.topsrcdir,
-+            '$(call py_action,file_generate,%s/generate-bar.py baz bar.c $(MDDEPDIR)/bar.c.pp $(MDDEPDIR)/bar.c.stub)' % env.topsrcdir,
-+            '@$(TOUCH) $@',
-             '',
--            'export:: foo.c',
-+            'export:: $(MDDEPDIR)/foo.c.stub',
-+            'foo.c: $(MDDEPDIR)/foo.c.stub ;',
-             'GARBAGE += foo.c',
-+            'GARBAGE += $(MDDEPDIR)/foo.c.stub',
-             'EXTRA_MDDEPEND_FILES += foo.c.pp',
--            'foo.c: %s/generate-foo.py $(srcdir)/foo-data' % (env.topsrcdir),
-+            '$(MDDEPDIR)/foo.c.stub: %s/generate-foo.py $(srcdir)/foo-data' % (env.topsrcdir),
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(srcdir)/foo-data)' % (env.topsrcdir),
-+            '$(call py_action,file_generate,%s/generate-foo.py main foo.c $(MDDEPDIR)/foo.c.pp $(MDDEPDIR)/foo.c.stub $(srcdir)/foo-data)' % (env.topsrcdir),
-+            '@$(TOUCH) $@',
-             '',
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-     def test_localized_generated_files(self):
-         """Ensure LOCALIZED_GENERATED_FILES is handled properly."""
-         env = self._consume('localized-generated-files', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
--            'libs:: foo.xyz',
-+            'libs:: $(MDDEPDIR)/foo.xyz.stub',
-+            'foo.xyz: $(MDDEPDIR)/foo.xyz.stub ;',
-             'GARBAGE += foo.xyz',
-+            'GARBAGE += $(MDDEPDIR)/foo.xyz.stub',
-             'EXTRA_MDDEPEND_FILES += foo.xyz.pp',
--            'foo.xyz: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-+            '$(MDDEPDIR)/foo.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '@$(TOUCH) $@',
-             '',
-             'LOCALIZED_FILES_0_FILES += foo.xyz',
-             'LOCALIZED_FILES_0_DEST = $(FINAL_TARGET)/',
-             'LOCALIZED_FILES_0_TARGET := libs',
-             'INSTALL_TARGETS += LOCALIZED_FILES_0',
-         ]
- 
-         self.maxDiff = None
-@@ -469,64 +484,86 @@ class TestRecursiveMakeBackend(BackendTe
-     def test_localized_generated_files_force(self):
-         """Ensure LOCALIZED_GENERATED_FILES with .force is handled properly."""
-         env = self._consume('localized-generated-files-force', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
--            'libs:: foo.xyz',
-+            'libs:: $(MDDEPDIR)/foo.xyz.stub',
-+            'foo.xyz: $(MDDEPDIR)/foo.xyz.stub ;',
-             'GARBAGE += foo.xyz',
-+            'GARBAGE += $(MDDEPDIR)/foo.xyz.stub',
-             'EXTRA_MDDEPEND_FILES += foo.xyz.pp',
--            'foo.xyz: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-+            '$(MDDEPDIR)/foo.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '@$(TOUCH) $@',
-             '',
--            'libs:: abc.xyz',
-+            'libs:: $(MDDEPDIR)/abc.xyz.stub',
-+            'abc.xyz: $(MDDEPDIR)/abc.xyz.stub ;',
-             'GARBAGE += abc.xyz',
-+            'GARBAGE += $(MDDEPDIR)/abc.xyz.stub',
-             'EXTRA_MDDEPEND_FILES += abc.xyz.pp',
--            'abc.xyz: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input FORCE' % env.topsrcdir,
-+            '$(MDDEPDIR)/abc.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input FORCE' % env.topsrcdir,
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(MDDEPDIR)/abc.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-++            '@$(TOUCH) $@',
-             '',
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-     def test_localized_generated_files_AB_CD(self):
-         """Ensure LOCALIZED_GENERATED_FILES is handled properly
-         when {AB_CD} and {AB_rCD} are used."""
-         env = self._consume('localized-generated-files-AB_CD', RecursiveMakeBackend)
- 
-         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
-         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- 
-         expected = [
--            'libs:: foo$(AB_CD).xyz',
-+            'libs:: $(MDDEPDIR)/foo$(AB_CD).xyz.stub',
-+            'foo$(AB_CD).xyz: $(MDDEPDIR)/foo$(AB_CD).xyz.stub ;',
-             'GARBAGE += foo$(AB_CD).xyz',
-+            'GARBAGE += $(MDDEPDIR)/foo$(AB_CD).xyz.stub',
-             'EXTRA_MDDEPEND_FILES += foo$(AB_CD).xyz.pp',
--            'foo$(AB_CD).xyz: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-+            '$(MDDEPDIR)/foo$(AB_CD).xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo$(AB_CD).xyz $(MDDEPDIR)/foo$(AB_CD).xyz.pp $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo$(AB_CD).xyz $(MDDEPDIR)/foo$(AB_CD).xyz.pp $(MDDEPDIR)/foo$(AB_CD).xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '@$(TOUCH) $@',
-             '',
-             'include $(topsrcdir)/config/AB_rCD.mk',
-+            'bar$(AB_rCD).xyz: $(MDDEPDIR)/bar$(AB_rCD).xyz.stub ;',
-             'GARBAGE += bar$(AB_rCD).xyz',
-+            'GARBAGE += $(MDDEPDIR)/bar$(AB_rCD).xyz.stub'
-             'EXTRA_MDDEPEND_FILES += bar$(AB_rCD).xyz.pp',
--            'bar$(AB_rCD).xyz: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-+            '$(MDDEPDIR)/bar$(AB_rCD).xyz.stub: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-             '$(REPORT_BUILD)',
--            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main bar$(AB_rCD).xyz $(MDDEPDIR)/bar$(AB_rCD).xyz.pp $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main bar$(AB_rCD).xyz $(MDDEPDIR)/bar$(AB_rCD).xyz.pp $(MDDEPDIR)/bar$(AB_rCD).xyz.stub $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '@$(TOUCH) $@',
-             '',
-             'GARBAGE += zot$(AB_rCD).xyz',
-             'EXTRA_MDDEPEND_FILES += zot$(AB_rCD).xyz.pp',
-             'zot$(AB_rCD).xyz: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-             '$(REPORT_BUILD)',
-             '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main zot$(AB_rCD).xyz $(MDDEPDIR)/zot$(AB_rCD).xyz.pp $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input)' % env.topsrcdir,
-             '',
-+            'zot$(AB_rCD).xyz: $(MDDEPDIR)/zot$(AB_rCD).xyz.stub ;',
-+            'GARBAGE += zot$(AB_rCD).xyz',
-+            'GARBAGE += $(MDDEPDIR)/zot$(AB_rCD).xyz.stub',
-+            'EXTRA_MDDEPEND_FILES += zot$(AB_rCD).xyz.pp',
-+            '$(MDDEPDIR)/zot$(AB_rCD).xyz.stub: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
-+            '$(REPORT_BUILD)',
-+            '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main zot$(AB_rCD).xyz $(MDDEPDIR)/zot$(AB_rCD).xyz.pp $(MDDEPDIR)/zot$(AB_rCD).xyz.stub $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input)' % env.topsrcdir,
-+            '@$(TOUCH) $@',
-+             '',
-+
-         ]
- 
-         self.maxDiff = None
-         self.assertEqual(lines, expected)
- 
-     def test_exports_generated(self):
-         """Ensure EXPORTS that are listed in GENERATED_FILES
-         are handled properly."""

+ 0 - 44
bug1240930-253/frg-mozilla/1454912-4-62a1.patch

@@ -1,44 +0,0 @@
-# HG changeset patch
-# User Mike Shal <mshal@mozilla.com>
-# Date 1525899064 14400
-# Node ID 9260cc524bb54d9318075578488de8a6f40677eb
-# Parent  1eb04a9bfb7a82eb6fac5e29be7c6b03999d9361
-Bug 1454912 - Revert "Bug 1218999 - Update mtimes when building a GENERATED_FILES target, even when contents don't change."; r=nalexander
-
-We no longer want to update mtimes of FileAvoidWrites so that downstream
-rules aren't triggered if the files aren't changed. Since the .stub file
-target of GENERATED_FILES are always touched, make won't continually
-rebuild them.
-
-MozReview-Commit-ID: GxrFgCJTYk
-
-diff --git a/python/mozbuild/mozbuild/action/file_generate.py b/python/mozbuild/mozbuild/action/file_generate.py
---- a/python/mozbuild/mozbuild/action/file_generate.py
-+++ b/python/mozbuild/mozbuild/action/file_generate.py
-@@ -95,25 +95,16 @@ def main(argv):
-                 # Add dependencies on any buildconfig items that were accessed
-                 # by the script.
-                 deps |= set(buildconfig.get_dependencies())
- 
-                 mk = Makefile()
-                 mk.create_rule([args.dep_target]).add_dependencies(deps)
-                 with FileAvoidWrite(args.dep_file) as dep_file:
-                     mk.dump(dep_file)
--        # Even when our file's contents haven't changed, we want to update
--        # the file's mtime so make knows this target isn't still older than
--        # whatever prerequisite caused it to be built this time around.
--        try:
--            os.utime(args.output_file, None)
--        except:
--            print('Error processing file "{0}"'.format(args.output_file),
--                  file=sys.stderr)
--            traceback.print_exc()
-     except IOError as e:
-         print('Error opening file "{0}"'.format(e.filename), file=sys.stderr)
-         traceback.print_exc()
-         return 1
-     return ret
- 
- if __name__ == '__main__':
-     sys.exit(main(sys.argv[1:]))
-

+ 0 - 178
bug1240930-253/frg-mozilla/1455504-62a1.patch

@@ -1,178 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1524613176 25200
-# Node ID b0e196352e1727b1df0ad2318a5587f62c9131ef
-# Parent  9b49f68440cb50dc807fc54280f5960281ea17f4
-Bug 1455504 - Normalize library paths to work around windows incremental linking bug. r=ted
-
-MozReview-Commit-ID: DuZaGMKVZrn
-
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1282,18 +1282,19 @@ class RecursiveMakeBackend(CommonBackend
-     def _process_host_library(self, libdef, backend_file):
-         backend_file.write('HOST_LIBRARY_NAME = %s\n' % libdef.basename)
- 
-     def _build_target_for_obj(self, obj):
-         return '%s/%s' % (mozpath.relpath(obj.objdir,
-             self.environment.topobjdir), obj.KIND)
- 
-     def _process_linked_libraries(self, obj, backend_file):
--        def pretty_relpath(lib):
--            return '$(DEPTH)/%s' % mozpath.relpath(lib.objdir, topobjdir)
-+        def pretty_relpath(lib, name):
-+            return os.path.normpath(mozpath.join(mozpath.relpath(lib.objdir, obj.objdir),
-+                                                 name))
- 
-         topobjdir = mozpath.normsep(obj.topobjdir)
-         # This will create the node even if there aren't any linked libraries.
-         build_target = self._build_target_for_obj(obj)
-         self._compile_graph[build_target]
- 
-         objs, no_pgo_objs, shared_libs, os_libs, static_libs = self._expand_libs(obj)
- 
-@@ -1354,34 +1355,35 @@ class RecursiveMakeBackend(CommonBackend
-                                                              pgo_list_file_path)
-                     backend_file.write_once('%s_PGO_OBJS := %s\n' %
-                                             (obj.name, pgo_list_file_ref))
-                     backend_file.write_once('%s: %s\n' % (obj_target,
-                                                           pgo_list_file_path))
-                 write_obj_deps(obj_target, objs_ref, pgo_objs_ref)
- 
-         for lib in shared_libs:
--            backend_file.write_once('SHARED_LIBS += %s/%s\n' %
--                                    (pretty_relpath(lib), lib.import_name))
-+            backend_file.write_once('SHARED_LIBS += %s\n' %
-+                                    pretty_relpath(lib, lib.import_name))
-         for lib in static_libs:
--            backend_file.write_once('STATIC_LIBS += %s/%s\n' %
--                                    (pretty_relpath(lib), lib.import_name))
-+            backend_file.write_once('STATIC_LIBS += %s\n' %
-+                                    pretty_relpath(lib, lib.import_name))
-         for lib in os_libs:
-             if obj.KIND == 'target':
-                 backend_file.write_once('OS_LIBS += %s\n' % lib)
-             else:
-                 backend_file.write_once('HOST_EXTRA_LIBS += %s\n' % lib)
- 
-         for lib in obj.linked_libraries:
-             if not isinstance(lib, ExternalLibrary):
-                 self._compile_graph[build_target].add(
-                     self._build_target_for_obj(lib))
--            if isinstance(lib, (HostLibrary, HostRustLibrary)):
--                backend_file.write_once('HOST_LIBS += %s/%s\n' %
--                                        (pretty_relpath(lib), lib.import_name))
-+            if isinstance(lib, (HostRustLibrary)):
-+                backend_file.write_once('HOST_LIBS += %s\n' %
-+                                        pretty_relpath(lib, lib.import_name))
-+
- 
-         # We have to link any Rust libraries after all intermediate static
-         # libraries have been listed to ensure that the Rust libraries are
-         # searched after the C/C++ objects that might reference Rust symbols.
-         if isinstance(obj, SharedLibrary):
-             self._process_rust_libraries(obj, backend_file, pretty_relpath)
- 
-         # Process library-based defines
-@@ -1396,18 +1398,18 @@ class RecursiveMakeBackend(CommonBackend
-             return
- 
-         # We should have already checked this in Linkable.link_library.
-         assert len(direct_linked) == 1
- 
-         # TODO: see bug 1310063 for checking dependencies are set up correctly.
- 
-         direct_linked = direct_linked[0]
--        backend_file.write('RUST_STATIC_LIB_FOR_SHARED_LIB := %s/%s\n' %
--                           (pretty_relpath(direct_linked), direct_linked.import_name))
-+        backend_file.write('RUST_STATIC_LIB_FOR_SHARED_LIB := %s\n' %
-+                           pretty_relpath(direct_linked, direct_linked.import_name))
- 
-     def _process_final_target_files(self, obj, files, backend_file):
-         target = obj.install_target
-         path = mozpath.basedir(target, (
-             'dist/bin',
-             'dist/xpi-stage',
-             '_tests',
-             'dist/include',
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-@@ -992,44 +992,45 @@ class TestRecursiveMakeBackend(BackendTe
- 
-             for line in lines:
-                 self.assertNotIn('LIB_IS_C_ONLY', line)
- 
-     def test_linkage(self):
-         env = self._consume('linkage', RecursiveMakeBackend)
-         expected_linkage = {
-             'prog': {
--                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux.so',
--                                '$(DEPTH)/shared/baz.so'],
--                'STATIC_LIBS': ['$(DEPTH)/real/foo.a'],
-+                'SHARED_LIBS': ['qux/qux.so',
-+                                '../shared/baz.so'],
-+                'STATIC_LIBS': ['../real/foo.a'],
-                 'OS_LIBS': ['-lfoo', '-lbaz', '-lbar'],
-             },
-             'shared': {
-                 'OS_LIBS': ['-lfoo'],
--                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux.so'],
-+                'SHARED_LIBS': ['../prog/qux/qux.so'],
-                 'STATIC_LIBS': [],
-             },
-             'static': {
--                'STATIC_LIBS': ['$(DEPTH)/real/foo.a'],
-+                'STATIC_LIBS': ['../real/foo.a'],
-                 'OS_LIBS': ['-lbar'],
--                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux.so'],
-+                'SHARED_LIBS': ['../prog/qux/qux.so'],
-             },
-             'real': {
-                 'STATIC_LIBS': [],
--                'SHARED_LIBS': ['$(DEPTH)/prog/qux/qux.so'],
-+                'SHARED_LIBS': ['../prog/qux/qux.so'],
-                 'OS_LIBS': ['-lbaz'],
-             }
-         }
-         actual_linkage = {}
-         for name in expected_linkage.keys():
-             with open(os.path.join(env.topobjdir, name, 'backend.mk'), 'rb') as fh:
-                 actual_linkage[name] = [line.rstrip() for line in fh.readlines()]
-         for name in expected_linkage:
-             for var in expected_linkage[name]:
-                 for val in expected_linkage[name][var]:
-+                    val = os.path.normpath(val)
-                     line = '%s += %s' % (var, val)
-                     self.assertIn(line,
-                                   actual_linkage[name])
-                     actual_linkage[name].remove(line)
-                 for line in actual_linkage[name]:
-                     self.assertNotIn('%s +=' % var, line)
- 
-     def test_list_files(self):
-@@ -1042,21 +1043,21 @@ class TestRecursiveMakeBackend(BackendTe
-             ],
-             'shared/baz_so.list': [
-                 'baz/baz1.o',
-             ],
-         }
-         actual_list_files = {}
-         for name in expected_list_files.keys():
-             with open(os.path.join(env.topobjdir, name), 'rb') as fh:
--                actual_list_files[name] = [mozpath.normsep(line.rstrip())
-+                actual_list_files[name] = [line.rstrip()
-                                            for line in fh.readlines()]
-         for name in expected_list_files:
-             self.assertEqual(actual_list_files[name],
--                             expected_list_files[name])
-+                             [os.path.normpath(f) for f in expected_list_files[name]])
- 
-         # We don't produce a list file for a shared library composed only of
-         # object files in its directory, but instead list them in a variable.
-         with open(os.path.join(env.topobjdir, 'prog', 'qux', 'backend.mk'), 'rb') as fh:
-             lines = [line.rstrip() for line in fh.readlines()]
- 
-         self.assertIn('qux.so_OBJS := qux1.o', lines)
- 

+ 0 - 74
bug1240930-253/frg-mozilla/1457321-1only-62a1.patch

@@ -1,74 +0,0 @@
-# HG changeset patch
-# User Kris Maglione <maglione.k@gmail.com>
-# Date 1524868975 25200
-# Node ID fe5d46cd794bfb3e8974d8213cb3fa752902ef3b
-# Parent  0dabdf7580cc81b98ffc96a9c7072df386bbf897
-Bug 1457321: Part 1 - Add bundled dictionaries to built_in_addons.json. r=ted,rhelmer
-
-MozReview-Commit-ID: GxCSXXaz8kz
-
-diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
---- a/browser/app/Makefile.in
-+++ b/browser/app/Makefile.in
-@@ -101,9 +101,9 @@ ifdef MOZ_UPDATER
- 	mv -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices'
- 	ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater'
- endif
- 	printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo'
- endif
- 
- .PHONY: features
- tools features::
--	$(PYTHON) -c 'import os, json; listing = {"system": sorted(os.listdir("$(DIST)/bin/browser/features"))}; print json.dumps(listing)' > $(DIST)/bin/browser/chrome/browser/content/browser/built_in_addons.json
-+	$(call py_action,generate_builtin_addons,--features=browser/features browser/chrome/browser/content/browser/built_in_addons.json)
-diff --git a/python/mozbuild/mozbuild/action/generate_builtin_addons.py b/python/mozbuild/mozbuild/action/generate_builtin_addons.py
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/action/generate_builtin_addons.py
-@@ -0,0 +1,46 @@
-+# 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/.
-+
-+from __future__ import absolute_import, print_function, unicode_literals
-+
-+import argparse
-+import json
-+import os.path
-+import sys
-+
-+import buildconfig
-+
-+
-+def main(argv):
-+    parser = argparse.ArgumentParser(
-+        description='Produces a JSON manifest of built-in add-ons')
-+    parser.add_argument('--features', type=str, dest='featuresdir',
-+                        action='store', help=('The distribution sub-directory '
-+                                              'containing feature add-ons'))
-+    parser.add_argument('outputfile', help='File to write output to')
-+    args = parser.parse_args(argv)
-+
-+    bindir = os.path.join(buildconfig.topobjdir, 'dist/bin')
-+
-+    def find_dictionaries(path):
-+        dicts = {}
-+        for filename in os.listdir(os.path.join(bindir, path)):
-+            base, ext = os.path.splitext(filename)
-+            if ext == '.dic':
-+                dicts[base] = '%s/%s' % (path, filename)
-+        return dicts
-+
-+    listing = {
-+        "dictionaries": find_dictionaries("dictionaries"),
-+    }
-+    if args.featuresdir:
-+        listing["system"] = sorted(os.listdir(os.path.join(bindir,
-+                                                           args.featuresdir)))
-+
-+    with open(os.path.join(bindir, args.outputfile), 'w') as fh:
-+        json.dump(listing, fh, sort_keys=True)
-+
-+
-+if __name__ == '__main__':
-+    sys.exit(main(sys.argv[1:]))

+ 0 - 33
bug1240930-253/frg-mozilla/1461383-62a1.patch

@@ -1,33 +0,0 @@
-# HG changeset patch
-# User Nathan Froyd <froydnj@mozilla.com>
-# Date 1526393123 14400
-# Node ID 73dd77918ce5997d13cefc2cae32c7ae4644ce82
-# Parent  d52f0d61dd570ae9414bfad4dd3df88051466fdd
-Bug 1461383 - fix test_build.py for local builds; r=chmanchester,f=mshal
-
-test_build.py fails on local builds with messages like:
-
-diff --git a/Makefile.in b/Makefile.in
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -28,18 +28,18 @@ DIST_GARBAGE = config.cache config.log c
-    config/autoconf.mk \
-    mozilla-config.h \
-    netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
-    .mozconfig.mk
- 
- ifndef MOZ_PROFILE_USE
- # Automation builds should always have a new buildid, but for the sake of not
- # re-linking libxul on every incremental build we do not enforce this for
--# developer builds.
--ifneq (,$(MOZ_AUTOMATION)$(MOZ_BUILD_DATE))
-+# developer builds.  Tests always need a new buildid as well.
-+ifneq (,$(MOZ_AUTOMATION)$(MOZ_BUILD_DATE)$(TEST_MOZBUILD))
- buildid.h source-repo.h: FORCE
- endif
- endif
- 
- ifdef JS_STANDALONE
- configure_dir = $(topsrcdir)/js/src
- else
- configure_dir = $(topsrcdir)

+ 0 - 183
bug1240930-253/frg-mozilla/1464128-62a1.patch

@@ -1,183 +0,0 @@
-# HG changeset patch
-# User Nick Alexander <nalexander@mozilla.com>
-# Date 1527186527 25200
-# Node ID 0f0e532db5ecc823a013c5f417d54694d6f38284
-# Parent  40d9ab3a11e4790dc5e1e56e78d6ade7320d4eca
-Bug 1464128 - Migrate bookmarks.html.in to LOCALIZED_GENERATED_FILES. r=ted.mielczarek
-
-This one looks to be pretty straight-forward.  It irritates me that
-the jar.mn entry doesn't explicitly say that the result is coming from
-the object directory, like
-
-locale/browser/bookmarks.html (!bookmarks.html)
-
-but that's for another day.
-
-MozReview-Commit-ID: Cw8E0VJhSxv
-
-diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
---- a/browser/locales/Makefile.in
-+++ b/browser/locales/Makefile.in
-@@ -60,18 +60,16 @@ DIST_SUBDIRS = $(DIST_SUBDIR)
- include $(topsrcdir)/config/rules.mk
- 
- include $(topsrcdir)/toolkit/locales/l10n.mk
- 
- $(list-json): $(call mkdir_deps,$(SEARCHPLUGINS_PATH)) $(if $(IS_LANGUAGE_REPACK),FORCE)
- 	$(call py_action,generate_searchjson,$(srcdir)/search/list.json $(AB_CD) $(list-json))
- searchplugins:: $(list-json)
- 
--DEFINES += -DBOOKMARKS_INCLUDE_DIR=$(dir $(call MERGE_FILE,profile/bookmarks.inc))
--
- libs-%: AB_CD=$*
- libs-%:
- 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
- 	$(NSINSTALL) -D $(DIST)/install
- 	@$(MAKE) -C ../../toolkit/locales libs-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
- 	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
- 	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
- ifneq (,$(wildcard ../extensions/formautofill/locales))
-diff --git a/browser/locales/generic/profile/bookmarks.html.in b/browser/locales/generic/profile/bookmarks.html.in
---- a/browser/locales/generic/profile/bookmarks.html.in
-+++ b/browser/locales/generic/profile/bookmarks.html.in
-@@ -1,14 +1,10 @@
- #filter substitution
--#include @BOOKMARKS_INCLUDE_DIR@/bookmarks.inc
--#define ja_jp_mac ja-JP-mac
--#if AB_CD == ja_jp_mac
--#define AB_CD ja
--#endif
-+#include @BOOKMARKS_INCLUDE_PATH@
- 
- #define mozilla_icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gwMDAsTBZbkNwAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAABNElEQVQ4y8WSsU0DURBE3yyWIaAJaqAAN4DPSL6AlIACKIEOyJEgRsIgOOkiInJqgAKowNg7BHdn7MOksNl+zZ//dvbDf5cAiklp22BdVtXdeTEpDYDB9m1VzU6OJuVp2NdEQCaI96fH2YHG4+mDduKYNMYINTcjcGbXzQVDEAphG0k48zUsajIbnAiMIXThpW8EICE0RAK4dvoKg9NIcTiQ589otyHOZLnwqK5nLwBFUZ4igc3iM0d1ff8CMC6mZ6Ihiaqq3gi1aUAnArD00SW1fq5OLBg0ymYmSZsR2/t4e/rGyCLW0sbp3oq+yTYqVgytQWui2FS7XYF7GFprY921T4CNQt8zr47dNzCkIX7y/jBtH+v+RGMQrc828W8pApnZbmEVQp/Ae7BlOy2ttib81/UFc+WRWEbjckIAAAAASUVORK5CYII=
- 
- #define nightly_icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA01JREFUeNpkk01oXFUUx//vzp33ZiaTzkwnyUwmsbbNRpp0GhuVKiVgQIUiLmoX7lyIG10I6qIUrG6KGyuYZbMwiATqxipSMVhQYwWhiwSJwUxKkzbz8ZJ5H/M+7/vunUIE7Vnc1f3/zjn/c46wsCbjIOI4Rlfew+Zf6/h9+RYYYzj70hymZp7GULUCSin+H8IBwLYsfLOwiOfffndK1c2LmhO84jl+2e5ZCTN6Xer0fpp5dmq+frxy5zGAY9n49IOLuHDls8uqE3y07YV0ywwQGA6oZsJRFRT0FnK2Hpw8PTl/7tXZDw8ApF/29YUvufjqxxqLPrnLQBUiQRUI4EcQHQ+EgwbjENl8Pv3H9W/f//m7W9cOAKkXzr+J4pm5umy6S/uEkiAEOlzscWHG5jTbhcsrDJiHsN1CIScJTlc5JaSlldEna9uk8fcGHNO6tOMGqfssQjNFoHOxyAXU9xF5HiRXw2AqhuUEsLs6giCkjbXG549a+O3mMhQneLnthOh0NBiaAdozkTEdpC0Hnm2hKAKR3ESJRigNFZBHCF2zn+p7SMIwRM9kRcI/D5g2xAcd1PQeMtw8xkGuafIRGRgZKfHfCbKlIu5t3IVASYYDDtMzL85il2fLuh6qIkFkWtjrARY3zjENJLwCKgqwOjLcnW30Qh/HnpmGYTJhT1bSdPL0NBpr+6rbs8qhIiPivQtRhDDJQuCViI4BxdJRrx/jBopob25BDmIMnzgZjFTK+2R4tAo4+q8iM9Ba3wBTuxirHELeM5AxFO6FCsnSsHNnFfL9XUiFIo7ypNmB9D3eQkT665nS5Xm72Q5r3KCo04be2MIRKULOUlEkPnJpAbn8AI7XJyEUy/CBhIrJlUdT6D/rP3x1u1yQFjP5bFIbH4HdbHG2j/GJMfiqzneCwVI0oFrD8OgTiKLgl5Ubi0v/uYV3ZqcrE2ff+Do2/LlUxAi/HKQZH9eegupzpxDztL4gIfTU9d3VG+ev/nh7s6/797wiz1K3VpYuDU3MvFWunXg9ly2WTNVNDZaPgIU08V3NMNXVZfmfP68lvt187Br78d5r52hoKaUkiWspQqqHx4+OCQLhFu3KAXNbCYQWzR5SBCr5X3x/M+lrHgowAMP2wWqd+FzxAAAAAElFTkSuQmCC
- 
- #define firefox_icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAz5JREFUeNpcU0toXFUY/s49596588ikySSmM8rk0UkJEirVTVEjYk1NUdRFFgouXZQI2k2hUCjdiYIuCi4Kuig0DbqQYgU3Yi0iFRuRCBMwaZvMZDTNY95z3/fM8b8jldpzOeeee/i/737n+/+f4ZExf730rkiaZ9NJMx/nmk5HypMqqLr+ZuD4F67N5ZYejmfRsnvhyKsLhSs3zP70SubgYKHSdFENu+gXAprQIGnvBi5ez0m1b6u7M399+PTx+UvtCKtFi2F6195qXK2byir88esy5ksfYND5DhuhRCtUKBNB0Q7w5Z8ee2GgWdjOn250fn5v5j8F5dOHlZD0kWRgAwp3hrKY0S9BJWKIcQ5PShhNG4+1bHx+IocT+RXcrRSDMfFNRvvt3Oyp/icIrRhUl9hoO4kt3F55Bxf3LkLV20jWOohbDjzXxyc/lMH0cRSyCd1xq+dFhu986t7T0CUwIzB8EkW3O5ibhj44ib7NJhiBKRoB/aS4ZWHjbxtjGQYP7nGRTjim1SaQqYiAVAREpHG8vzWJn+6PQ6CF0HPR7nQQczpYeEWHyWMUkwU8MSECGwgJxAWp9xWKNzkuH3oet+JDlIE9Momedh1G4CN0bfhVG9nsS0BQQthJx0V7j3elq7ihqV5ezQTwZmodP9ZGkU/bOPr4Nr53xtDYsaD7Dg4nNqFaH5OCYSSdGhf7daNmuv6wEKqXk/yExKGBHSznFsH6FFpKQ/JAA0ulUejWLt44lkHXsqDaX6C6Nl4Rnq8vK8s/KThDMlJhkI91YOO+iR3XwEelCdTCBLSgijNzd6DLNfhlHfZ6FtWiWBQpq/V2LdSrrNPljBQkoOjuCiPxAMutOIbkPqYSEqeequGZaTLzdhZhS0PlnlB9bvhtr5CuHj3y2Qj8hVQ/kEopxONEEsO/0yATDYXYAdWrE69JEElXq7Hyk0tro+xBU1yZmr4xrIcvptIRCZlJJAYBmRGRkD08aivA7VDvWPqt564Xn41w/AHB1/u7l1/uGxGU8mNcgodUNDIq0JDeLnpzc1uo1Qr76rWbqyf/142PjsXJqdkmN2YDnQ9oGkJNU+t57q7qUv4y9/t64+HYfwQYAN7OczrzUDvGAAAAAElFTkSuQmCC
- 
- #define bugzilla_icon data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnYCL7J0pY9wwETY9kYEM9AAAAAEBAYAhVVVUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1bjTOS1Vb/wAA2/8JEqT/Q0g8kQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJnMqoiJtJ/0haST/NEkp/yQnW/8AAPD8AAHY/RsgP/JZUI+GKitih4ObUEAAAAAAAAAAAAAAAAAAAAAAKnouwip5Lv9ooW//a6Jz/y9GIv8JBXb/AADO/gEBvf8AAK7/FRJp/z9BfP8iLGj1AAAAAAAAAAAAAAAAL4YzwiB0I/+UwJ3/bK+C/02eZ/9CTjz/DBa1/wABxf8BAOj/AACp/w8Oc/sJCv//EhCN9AAAAAAAAAAANJA6iC2MMv93tYL/TZ5U/3mzjP9NoWr/NEss/wYIU/8CBOn/ARCX/wwNqP0TD6X/Cgyex5qacDAAAAAAAAAAADKUN/ZirWj/d76R/0SgXf9Ln1P/eLSM/1mda/8rOkb/CQiD/wMQvf8UEnT/MTAt4P//MwUhZyN8AAAAAAAAAAAznDf5UqlZ/228jP9NqnD/Qp9c/0yiVP+Dv5b/VaVw/0VxXf9PZXD/S3pQ/y54Nf8jcCf/I2wn/wAAAAA0ozjIM6E4/zOeOP+Uz6z/XLR+/06scv9BoV3/TqZX/4XBmP9XqHP/hr6Z/yp+Lf8leSr1JXUqbQAAAAA3rTz7Nqo7/zWmOqM3oz7rUK1W/43Mpf9etYD/T61z/0KjXf9Rqln/msup/46/lf8pgy7/JFg6sAAAAAAAAAAAOK8+8jqvOiMAAAAAAAAAADSlOv85pT//kM6o/2K5hP9Ysnv/YLJ2/ziXPv8piS3/V6Ri/yZQQ9wAAAAAAAAAAAAAAAAAAAAAAAAAADetP0E2qzz/OKg98UWsS/+e1K3/pNe4/4XDjv8ojy3/T7df/5fIqv8sjTH/K4kw/yqFLv8AAAAAAAAAAAAAAAA4sT3xN7A8+QAAAAA4qz3yNag6/zSlOf80oTn/csJ+/6/jwv9fjHj/MmRMdQAAAAAAAAAAAAAAAAAAAAAAAAAAOrdA/zm0QHQAAAAAAAAAADasO/k2qTvuRX5lpjqGT/gznDr/O3FXigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADq9QiMAAAAAAAAAAAAAAAA4sj7/Nq09s0uOaSI1qTplM6U68wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOrc//zu0P0EAAAAAOK4+UjWsPPgAAAAAAAAAAAAAAAAAAAAA/48AAP8HAAD4AQAA8AAAAOAAAADAAQAAwAMAAMAAAACAAwAAAAMAAHADAADwAAAA5AcAAO4HAAD+bwAA/u8AAA==
-diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
---- a/browser/locales/jar.mn
-+++ b/browser/locales/jar.mn
-@@ -1,17 +1,18 @@
- #filter substitution
- # 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/.
- 
- 
- @AB_CD@.jar:
- % locale browser @AB_CD@ %locale/browser/
--*   locale/browser/bookmarks.html                  (generic/profile/bookmarks.html.in)
-+# bookmarks.html is produced by LOCALIZED_GENERATED_FILES.
-+    locale/browser/bookmarks.html                  (bookmarks.html)
-     locale/browser/aboutAccounts.dtd               (%chrome/browser/aboutAccounts.dtd)
-     locale/browser/aboutDialog.dtd                 (%chrome/browser/aboutDialog.dtd)
-     locale/browser/aboutPrivateBrowsing.dtd        (%chrome/browser/aboutPrivateBrowsing.dtd)
-     locale/browser/aboutPrivateBrowsing.properties (%chrome/browser/aboutPrivateBrowsing.properties)
-     locale/browser/aboutRobots.dtd                 (%chrome/browser/aboutRobots.dtd)
-     locale/browser/aboutHome.dtd                   (%chrome/browser/aboutHome.dtd)
-     locale/browser/accounts.properties             (%chrome/browser/accounts.properties)
-     locale/browser/aboutSearchReset.dtd            (%chrome/browser/aboutSearchReset.dtd)
-diff --git a/browser/locales/moz.build b/browser/locales/moz.build
---- a/browser/locales/moz.build
-+++ b/browser/locales/moz.build
-@@ -19,8 +19,18 @@ if CONFIG['MOZ_UPDATER']:
-     updater.inputs = [
-         'en-US/updater/updater.ini',
-         '../installer/windows/nsis/updater_append.ini',
-     ]
-     # Yes, this is weird, but what can you do? This file doesn't want to be in the DIST_SUBDIR,
-     # but we can't really move it to a different directory until we change how locale repacks
-     # work.
-     LOCALIZED_FILES['..'] += ['!updater.ini']
-+
-+LOCALIZED_GENERATED_FILES += ['bookmarks.html']
-+bookmarks = LOCALIZED_GENERATED_FILES['bookmarks.html']
-+bookmarks.script = 'generate_bookmarks.py'
-+bookmarks.inputs = [
-+    # This input will not be considered for localization.
-+    'generic/profile/bookmarks.html.in',
-+    # The `locales/en-US/` will be rewritten to the locale-specific path.
-+    'en-US/profile/bookmarks.inc',
-+]
-diff --git a/config/faster/rules.mk b/config/faster/rules.mk
---- a/config/faster/rules.mk
-+++ b/config/faster/rules.mk
-@@ -79,22 +79,20 @@ ACDEFINES += -DBUILD_FASTER
- # corresponding install manifests are named correspondingly, with forward
- # slashes replaced with underscores, and prefixed with `install_`. That is,
- # the install manifest for `dist/bin` would be `install_dist_bin`.
- $(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(addprefix $(TOPOBJDIR)/,buildid.h source-repo.h)
- 	@# For now, force preprocessed files to be reprocessed every time.
- 	@# The overhead is not that big, and this avoids waiting for proper
- 	@# support for defines tracking in process_install_manifest.
- 	@touch install_$(subst /,_,$*)
--	@# BOOKMARKS_INCLUDE_DIR is for bookmarks.html only.
- 	$(PYTHON) -m mozbuild.action.process_install_manifest \
- 		--track install_$(subst /,_,$*).track \
- 		$(TOPOBJDIR)/$* \
- 		-DAB_CD=en-US \
--		-DBOOKMARKS_INCLUDE_DIR=$(TOPSRCDIR)/browser/locales/en-US/profile \
- 		$(ACDEFINES) \
- 		install_$(subst /,_,$*)
- 
- # ============================================================================
- # Below is a set of additional dependencies and variables used to build things
- # that are not supported by data in moz.build.
- 
- # The xpidl target in config/makefiles/xpidl requires the install manifest for
-diff --git a/python/mozbuild/mozbuild/backend/tup.py b/python/mozbuild/mozbuild/backend/tup.py
---- a/python/mozbuild/mozbuild/backend/tup.py
-+++ b/python/mozbuild/mozbuild/backend/tup.py
-@@ -236,20 +236,16 @@ class TupOnly(CommonBackend, PartialBack
-                 pass
- 
-         with self._write_file(mozpath.join(self.environment.topobjdir, 'Tuprules.tup')) as fh:
-             acdefines_flags = ' '.join(['-D%s=%s' % (name, shell_quote(value))
-                 for (name, value) in sorted(self.environment.acdefines.iteritems())])
-             # TODO: AB_CD only exists in Makefiles at the moment.
-             acdefines_flags += ' -DAB_CD=en-US'
- 
--            # TODO: BOOKMARKS_INCLUDE_DIR is used by bookmarks.html.in, and is
--            # only defined in browser/locales/Makefile.in
--            acdefines_flags += ' -DBOOKMARKS_INCLUDE_DIR=%s/browser/locales/en-US/profile' % self.environment.topsrcdir
--
-             # Use BUILD_FASTER to avoid CXXFLAGS/CPPFLAGS in
-             # toolkit/content/buildconfig.html
-             acdefines_flags += ' -DBUILD_FASTER=1'
- 
-             fh.write('MOZ_OBJ_ROOT = $(TUP_CWD)\n')
-             fh.write('DIST = $(MOZ_OBJ_ROOT)/dist\n')
-             fh.write('ACDEFINES = %s\n' % acdefines_flags)
-             fh.write('topsrcdir = $(MOZ_OBJ_ROOT)/%s\n' % (
-diff --git a/python/mozbuild/mozbuild/faster_daemon.py b/python/mozbuild/mozbuild/faster_daemon.py
---- a/python/mozbuild/mozbuild/faster_daemon.py
-+++ b/python/mozbuild/mozbuild/faster_daemon.py
-@@ -64,26 +64,20 @@ class Daemon(object):
-         self.config_environment = config_environment
-         self._client = None
- 
-     @property
-     def defines(self):
-         defines = dict(self.config_environment.acdefines)
-         # These additions work around warts in the build system: see
-         # http://searchfox.org/mozilla-central/rev/ad093e98f42338effe2e2513e26c3a311dd96422/config/faster/rules.mk#92-93
--        # and
--        # http://searchfox.org/mozilla-central/rev/ad093e98f42338effe2e2513e26c3a311dd96422/python/mozbuild/mozbuild/backend/tup.py#244-253.
-         defines.update({
-             'AB_CD': 'en-US',
-             'BUILD_FASTER': '1',
-         })
--        defines.update({
--            'BOOKMARKS_INCLUDE_DIR': mozpath.join(self.config_environment.topsrcdir,
--                                                  'browser', 'locales', 'en-US', 'profile'),
--        })
-         return defines
- 
-     @mozbuild.util.memoized_property
-     def file_copier(self):
-         # TODO: invalidate the file copier when the build system
-         # itself changes, i.e., the underlying unified manifest
-         # changes.
-         file_copier = FileCopier()

+ 0 - 37
bug1240930-253/frg-mozilla/1470552-62a1.patch

@@ -1,37 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1529705439 25200
-# Node ID 1dbc843c1429a374579251d6c843e11bd211ec28
-# Parent  6aec9dc32d1c194f22d98bc51e886678ff0ba200
-Bug 1470552 - Update Makefile.in to refer to stub file target for buildid.h and source-repo.h generated in backend.mk r=froydnj
-
-MozReview-Commit-ID: CxLkQjX8veW
-
-diff --git a/Makefile.in b/Makefile.in
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -30,17 +30,23 @@ DIST_GARBAGE = config.cache config.log c
-    netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
-    .mozconfig.mk
- 
- ifndef MOZ_PROFILE_USE
- # Automation builds should always have a new buildid, but for the sake of not
- # re-linking libxul on every incremental build we do not enforce this for
- # developer builds.  Tests always need a new buildid as well.
- ifneq (,$(MOZ_AUTOMATION)$(MOZ_BUILD_DATE)$(TEST_MOZBUILD))
--buildid.h source-repo.h: FORCE
-+$(MDDEPDIR)/buildid.h.stub $(MDDEPDIR)/source-repo.h.stub: FORCE
-+endif
-+# Additionally, provide a dummy target during tests, because
-+# faster/rules.mk will expect these targets to exist.
-+ifdef TEST_MOZBUILD
-+source-repo.h: $(MDDEPDIR)/source-repo.h.stub
-+buildid.h: $(MDDEPDIR)/buildid.h.stub
- endif
- endif
- 
- ifdef JS_STANDALONE
- configure_dir = $(topsrcdir)/js/src
- else
- configure_dir = $(topsrcdir)
- endif

+ 0 - 29
bug1240930-253/frg-mozilla/1476874-63a1.patch

@@ -1,29 +0,0 @@
-# HG changeset patch
-# User Mike Hommey <mh+mozilla@glandium.org>
-# Date 1531985419 -32400
-# Node ID d93096c59a0a3e328bafd9b60e44861699c7339c
-# Parent  f4cc12cb0456ed196cacd0718449c9737721cdda
-Bug 1476874 - Only link object once in static libraries. r=froydnj
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -644,17 +644,17 @@ endif
- endif
- ifndef CROSS_COMPILE
- 	$(call py_action,check_binary,--host $@)
- endif
- 
- $(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- 	$(RM) $(REAL_LIBRARY)
--	$(AR) $(AR_FLAGS) $(OBJS) $($@_$(OBJS_VAR_SUFFIX))
-+	$(AR) $(AR_FLAGS) $($@_$(OBJS_VAR_SUFFIX))
- 
- ifeq ($(OS_ARCH),WINNT)
- # Import libraries are created by the rules creating shared libraries.
- # The rules to copy them to $(DIST)/lib depend on $(IMPORT_LIBRARY),
- # but make will happily consider the import library before it is refreshed
- # when rebuilding the corresponding shared library. Defining an empty recipe
- # for import libraries forces make to wait for the shared library recipe to
- # have run before considering other targets that depend on the import library.

+ 0 - 94
bug1240930-253/frg-mozilla/1642032-1-79a1.patch

@@ -1,94 +0,0 @@
-# HG changeset patch
-# User Nathan Froyd <froydnj@mozilla.com>
-# Date 1591734204 0
-# Node ID a9239d02662726ebc80e3c0b02213b32795feaf4
-# Parent  fba4303d6219d355e1a767727f308a80328ef2b9
-Bug 1642032 - part 1 - factor out install targets for final target files; r=nalexander
-
-We're going to reuse this machinery in a subsequent patch.  I think this
-change, by virtue of moving all the output to a single place, also makes
-things clearer.
-
-Differential Revision: https://phabricator.services.mozilla.com/D78617
-
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1421,16 +1421,24 @@ class RecursiveMakeBackend(CommonBackend
-         assert len(direct_linked) == 1
- 
-         # TODO: see bug 1310063 for checking dependencies are set up correctly.
- 
-         direct_linked = direct_linked[0]
-         backend_file.write('RUST_STATIC_LIB_FOR_SHARED_LIB := %s\n' %
-                            pretty_relpath(direct_linked, direct_linked.import_name))
- 
-+    def _add_install_target(self, backend_file, install_target, tier, dest, files):
-+        self._no_skip[tier].add(backend_file.relobjdir)
-+        for f in files:
-+            backend_file.write('%s_FILES += %s\n' % (install_target, f))
-+        backend_file.write('%s_DEST := %s\n' % (install_target, dest))
-+        backend_file.write('%s_TARGET := %s\n' % (install_target, tier))
-+        backend_file.write('INSTALL_TARGETS += %s\n' % install_target)
-+
-     def _process_final_target_files(self, obj, files, backend_file):
-         target = obj.install_target
-         path = mozpath.basedir(target, (
-             'dist/bin',
-             'dist/xpi-stage',
-             '_tests',
-             'dist/include',
-         ))
-@@ -1443,17 +1451,18 @@ class RecursiveMakeBackend(CommonBackend
- 
-         manifest = path.replace('/', '_')
-         install_manifest = self._install_manifests[manifest]
-         reltarget = mozpath.relpath(target, path)
- 
-         for path, files in files.walk():
-             target_var = (mozpath.join(target, path)
-                           if path else target).replace('/', '_')
--            have_objdir_files = False
-+            objdir_files = []
-+
-             for f in files:
-                 assert not isinstance(f, RenamedSourcePath)
-                 dest = mozpath.join(reltarget, path, f.target_basename)
-                 if not isinstance(f, ObjDirPath):
-                     if '*' in f:
-                         if f.startswith('/') or isinstance(f, AbsolutePath):
-                             basepath, wild = os.path.split(f.full_path)
-                             if '*' in basepath:
-@@ -1462,27 +1471,22 @@ class RecursiveMakeBackend(CommonBackend
- 
-                             install_manifest.add_pattern_link(basepath, wild, path)
-                         else:
-                             install_manifest.add_pattern_link(f.srcdir, f, path)
-                     else:
-                         install_manifest.add_link(f.full_path, dest)
-                 else:
-                     install_manifest.add_optional_exists(dest)
--                    backend_file.write('%s_FILES += %s\n' % (
--                        target_var, self._pretty_path(f, backend_file)))
--                    have_objdir_files = True
--            if have_objdir_files:
-+                    objdir_files.append(self._pretty_path(f, backend_file))
-+            if objdir_files:
-                 tier = 'export' if obj.install_target == 'dist/include' else 'misc'
--                self._no_skip[tier].add(backend_file.relobjdir)
--                backend_file.write('%s_DEST := $(DEPTH)/%s\n'
--                                   % (target_var,
--                                      mozpath.join(target, path)))
--                backend_file.write('%s_TARGET := %s\n' % (target_var, tier))
--                backend_file.write('INSTALL_TARGETS += %s\n' % target_var)
-+                self._add_install_target(backend_file, target_var, tier,
-+                                         '$(DEPTH)/%s' % mozpath.join(target, path),
-+                                         objdir_files)
- 
-     def _process_final_target_pp_files(self, obj, files, backend_file, name):
-         # Bug 1177710 - We'd like to install these via manifests as
-         # preprocessed files. But they currently depend on non-standard flags
-         # being added via some Makefiles, so for now we just pass them through
-         # to the underlying Makefile.in.
-         #
-         # Note that if this becomes a manifest, OBJDIR_PP_FILES will likely

+ 0 - 84
bug1240930-253/frg-mozilla/1642032-2-79a1.patch

@@ -1,84 +0,0 @@
-# HG changeset patch
-# User Nathan Froyd <froydnj@mozilla.com>
-# Date 1591734209 0
-# Node ID c1628d8da86fff9d408cb53d1a3c886c57099101
-# Parent  a9239d02662726ebc80e3c0b02213b32795feaf4
-Bug 1642032 - part 2 - install non-wildcard absolute FINAL_TARGET_FILES during misc; r=nalexander
-
-Such files are, at least as of this writing, only libraries, and we can
-get by with installing them later.  This change will also avoid having
-them added to the dependent libraries list.
-
-Differential Revision: https://phabricator.services.mozilla.com/D78618
-
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -1451,42 +1451,64 @@ class RecursiveMakeBackend(CommonBackend
- 
-         manifest = path.replace('/', '_')
-         install_manifest = self._install_manifests[manifest]
-         reltarget = mozpath.relpath(target, path)
- 
-         for path, files in files.walk():
-             target_var = (mozpath.join(target, path)
-                           if path else target).replace('/', '_')
-+            # We don't necessarily want to combine these, because non-wildcard
-+            # absolute files tend to be libraries, and we don't want to mix
-+            # those in with objdir headers that will be installed during export.
-+            # (See bug 1642882 for details.)
-             objdir_files = []
--
-+            absolute_files = []
-+ 
-             for f in files:
-                 assert not isinstance(f, RenamedSourcePath)
-                 dest = mozpath.join(reltarget, path, f.target_basename)
-                 if not isinstance(f, ObjDirPath):
-                     if '*' in f:
-                         if f.startswith('/') or isinstance(f, AbsolutePath):
-                             basepath, wild = os.path.split(f.full_path)
-                             if '*' in basepath:
-                                 raise Exception("Wildcards are only supported in the filename part of "
-                                                 "srcdir-relative or absolute paths.")
- 
-                             install_manifest.add_pattern_link(basepath, wild, path)
-                         else:
-                             install_manifest.add_pattern_link(f.srcdir, f, path)
-+                    elif isinstance(f, AbsolutePath):
-+                        if not f.full_path.lower().endswith(('.dll', '.pdb', '.so')):
-+                            raise Exception("Absolute paths installed to FINAL_TARGET_FILES must"
-+                                            " only be shared libraries or associated debug"
-+                                            " information.")
-+                        install_manifest.add_optional_exists(dest)
-+                        absolute_files.append(f.full_path)
-                     else:
-                         install_manifest.add_link(f.full_path, dest)
-                 else:
-                     install_manifest.add_optional_exists(dest)
-                     objdir_files.append(self._pretty_path(f, backend_file))
-+            install_location = '$(DEPTH)/%s' % mozpath.join(target, path)
-             if objdir_files:
-                 tier = 'export' if obj.install_target == 'dist/include' else 'misc'
-                 self._add_install_target(backend_file, target_var, tier,
--                                         '$(DEPTH)/%s' % mozpath.join(target, path),
--                                         objdir_files)
-+                                         install_location, objdir_files)
-+            if absolute_files:
-+                # Unfortunately, we can't use _add_install_target because on
-+                # Windows, the absolute file paths that we want to install
-+                # from often have spaces.  So we write our own rule.
-+                self._no_skip['misc'].add(backend_file.relobjdir)
-+                backend_file.write('misc::\n%s\n' %
-+                                   '\n'.join(
-+                                       '\t$(INSTALL) %s %s' % (
-+                                           make_quote(shell_quote(f)), install_location)
-+                                       for f in absolute_files))
- 
-     def _process_final_target_pp_files(self, obj, files, backend_file, name):
-         # Bug 1177710 - We'd like to install these via manifests as
-         # preprocessed files. But they currently depend on non-standard flags
-         # being added via some Makefiles, so for now we just pass them through
-         # to the underlying Makefile.in.
-         #
-         # Note that if this becomes a manifest, OBJDIR_PP_FILES will likely

+ 0 - 46
bug1240930-253/frg-mozilla/1642032-3-79a1.patch

@@ -1,46 +0,0 @@
-# HG changeset patch
-# User Nathan Froyd <froydnj@mozilla.com>
-# Date 1591823220 0
-# Node ID 7bc89fd272217c7a94ae32184c1d9c99f78e1bd4
-# Parent  167519caa6fea866d42b3ec4818255df816dcf13
-Bug 1642032 - ignore d3dcompiler_47.dll in dependentlibs determination; r=firefox-build-system-reviewers,rstewart
-
-We moved the installation of shared libraries, such as
-`d3dcompiler_47.dll` to the `misc` tier with the idea of making sure
-they weren't taken into account during the computation of the
-`dependentlibs.list`.  Unfortunately, `dependentlibs.list` is itself
-computed during `misc`, so we have an unfortunate race condition where
-sometimes libraries might wind up in the list and sometimes they won't.
-
-For this particular case, we can follow what we already do for ICU and
-ignore the library, especially since we're dynamically loading the
-library anyway.
-
-Differential Revision: https://phabricator.services.mozilla.com/D79147
-
-diff --git a/toolkit/library/dependentlibs.py b/toolkit/library/dependentlibs.py
---- a/toolkit/library/dependentlibs.py
-+++ b/toolkit/library/dependentlibs.py
-@@ -107,18 +107,20 @@ def dependentlibs(lib, libpaths, func):
-         if dep in deps or os.path.isabs(dep):
-             continue
-         for dir in libpaths:
-             deppath = os.path.join(dir, dep)
-             if os.path.exists(deppath):
-                 deps.update(dependentlibs(deppath, libpaths, func))
-                 # Black list the ICU data DLL because preloading it at startup
-                 # leads to startup performance problems because of its excessive
--                # size (around 10MB).
--                if not dep.startswith("icu"):
-+                # size (around 10MB).  Same thing with d3dcompiler_47.dll, but
-+                # to a lesser extent, and we were going to dynamically load it
-+                # anyway.
-+                if not dep.startswith(("icu", "d3dcompiler_47")):
-                     deps[dep] = deppath
-                 break
- 
-     return deps
- 
- def gen_list(output, lib):
-     libpaths = [os.path.join(substs['DIST'], 'bin')]
-     binary_type = get_type(lib)

+ 0 - 21
bug1240930-253/frg-mozilla/series

@@ -1,21 +0,0 @@
-1429875-1-61a1.patch
-1429875-2-61a1.patch
-1429875-3-61a1.patch
-1429875-4-61a1.patch
-1429875-5-61a1.patch
-1449965-61a1.patch
-1455504-62a1.patch
-1476874-63a1.patch
-1443208-1only-62a1.patch
-1454912-2no1-62a1.patch
-1454912-3-62a1.patch
-1454912-4-62a1.patch
-1461383-62a1.patch
-1470552-62a1.patch
-1642032-1-79a1.patch
-1642032-2-79a1.patch
-1642032-3-79a1.patch
-1464128-62a1.patch
-1437942-62a1.patch
-1240930-80a1.patch
-1457321-1only-62a1.patch