Frank-Rainer Grahl 3 years ago
parent
commit
c1ecb60852
39 changed files with 4083 additions and 2304 deletions
  1. 445 0
      bug1240930-253/frg-mozilla/1240930-80a1.patch
  2. 0 346
      bug1240930-253/frg-mozilla/1255485-1-61a1.patch
  3. 0 78
      bug1240930-253/frg-mozilla/1255485-2-61a1.patch
  4. 0 31
      bug1240930-253/frg-mozilla/1255485-3-61a1.patch
  5. 0 37
      bug1240930-253/frg-mozilla/1255485-4-61a1.patch
  6. 0 224
      bug1240930-253/frg-mozilla/1255485-5-61a1.patch
  7. 0 45
      bug1240930-253/frg-mozilla/1255485-6-61a1.patch
  8. 0 100
      bug1240930-253/frg-mozilla/1360650-1only-59a1.patch
  9. 0 46
      bug1240930-253/frg-mozilla/1373878-1-58a1.patch
  10. 0 257
      bug1240930-253/frg-mozilla/1373878-2no345-58a1.patch
  11. 0 185
      bug1240930-253/frg-mozilla/1388423-57a1.patch
  12. 0 130
      bug1240930-253/frg-mozilla/1414064-1-58a1.patch
  13. 0 70
      bug1240930-253/frg-mozilla/1414064-2-58a1.patch
  14. 0 34
      bug1240930-253/frg-mozilla/1414064-3-58a1.patch
  15. 0 151
      bug1240930-253/frg-mozilla/1414064-4-58a1.patch
  16. 0 131
      bug1240930-253/frg-mozilla/1414064-5-58a1.patch
  17. 0 132
      bug1240930-253/frg-mozilla/1414064-6-58a1.patch
  18. 4 4
      bug1240930-253/frg-mozilla/1429875-1-61a1.patch
  19. 14 16
      bug1240930-253/frg-mozilla/1429875-4-61a1.patch
  20. 78 5
      bug1240930-253/frg-mozilla/1429875-5-61a1.patch
  21. 0 65
      bug1240930-253/frg-mozilla/1430886-59a1.patch
  22. 1565 0
      bug1240930-253/frg-mozilla/1437942-62a1.patch
  23. 0 190
      bug1240930-253/frg-mozilla/1443204-1only-60a1.patch
  24. 439 0
      bug1240930-253/frg-mozilla/1443208-1only-62a1.patch
  25. 160 0
      bug1240930-253/frg-mozilla/1449965-61a1.patch
  26. 143 0
      bug1240930-253/frg-mozilla/1454912-2no1-62a1.patch
  27. 412 0
      bug1240930-253/frg-mozilla/1454912-3-62a1.patch
  28. 44 0
      bug1240930-253/frg-mozilla/1454912-4-62a1.patch
  29. 178 0
      bug1240930-253/frg-mozilla/1455504-62a1.patch
  30. 74 0
      bug1240930-253/frg-mozilla/1457321-1only-62a1.patch
  31. 33 0
      bug1240930-253/frg-mozilla/1461383-62a1.patch
  32. 183 0
      bug1240930-253/frg-mozilla/1464128-62a1.patch
  33. 37 0
      bug1240930-253/frg-mozilla/1470552-62a1.patch
  34. 29 0
      bug1240930-253/frg-mozilla/1476874-63a1.patch
  35. 94 0
      bug1240930-253/frg-mozilla/1642032-1-79a1.patch
  36. 84 0
      bug1240930-253/frg-mozilla/1642032-2-79a1.patch
  37. 46 0
      bug1240930-253/frg-mozilla/1642032-3-79a1.patch
  38. 21 0
      bug1240930-253/frg-mozilla/series
  39. 0 27
      bug1240930-253/frg-mozilla/series-pre

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

@@ -0,0 +1,445 @@
+# 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 - 346
bug1240930-253/frg-mozilla/1255485-1-61a1.patch

@@ -1,346 +0,0 @@
-# HG changeset patch
-# User Ted Mielczarek <ted@mielczarek.org>
-# Date 1515612372 18000
-# Node ID ad09b92fb875944ba775ef452a245669b567619d
-# Parent  ddeb9de08364d934d91a608493b8d12228c14e76
-bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
-
-Historically we built all our binaries in directories in the objdir, then
-symlinked them into dist/bin. Some binaries needed to be copied instead
-so that certain relative path lookups work properly, so we resorted to
-sprinkling `NSDISTMODE=copy` around Makefiles.
-
-This change makes it so we build PROGRAMs (not any other sort of targets)
-directly in dist/bin instead. We could do the same for our other targets
-with a little more work.
-
-There were several places in the tree that were copying built binaries to
-some other place and needed fixup to match the new location of binaries.
-
-On Windows pdb files are left in the objdir where the program was
-originally linked. symbolstore.py needs to locate the pdb file both to
-determine whether it should dump symbols for a binary and also to copy
-the pdb file into the symbol package. We fix this by simply looking for
-the pdb file in the current working directory if it isn't present next
-to the binary, which matches how we invoke symbolstore.py.
-
-MozReview-Commit-ID: 8TOD1uTXD5e
-
-diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
---- a/browser/app/Makefile.in
-+++ b/browser/app/Makefile.in
-@@ -41,17 +41,17 @@ endif
- PROGRAMS_DEST = $(DIST)/bin
- 
- include $(topsrcdir)/config/rules.mk
- 
- ifneq (,$(filter-out WINNT,$(OS_ARCH)))
- 
- ifdef COMPILE_ENVIRONMENT
- libs:: 
--	cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
-+	cp -p $(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
- endif
- 
- GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, firefox.js)
- 
- endif
- 
- # channel-prefs.js is handled separate from other prefs due to bug 756325
- libs:: $(srcdir)/profile/channel-prefs.js
-diff --git a/config/makefiles/target_binaries.mk b/config/makefiles/target_binaries.mk
---- a/config/makefiles/target_binaries.mk
-+++ b/config/makefiles/target_binaries.mk
-@@ -2,18 +2,18 @@
- # vim:set ts=8 sw=8 sts=8 noet:
- #
- # 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/.
- 
- ifndef NO_DIST_INSTALL
- 
--ifneq (,$(strip $(PROGRAM)$(SIMPLE_PROGRAMS)$(RUST_PROGRAMS)))
--PROGRAMS_EXECUTABLES = $(SIMPLE_PROGRAMS) $(PROGRAM) $(RUST_PROGRAMS)
-+ifneq (,$(strip $(SIMPLE_PROGRAMS)$(RUST_PROGRAMS)))
-+PROGRAMS_EXECUTABLES = $(SIMPLE_PROGRAMS) $(RUST_PROGRAMS)
- PROGRAMS_DEST ?= $(FINAL_TARGET)
- PROGRAMS_TARGET := target
- INSTALL_TARGETS += PROGRAMS
- endif
- 
- 
- ifdef SHARED_LIBRARY
- SHARED_LIBRARY_FILES = $(SHARED_LIBRARY)
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -544,17 +544,17 @@ 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)
-+$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(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) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
- ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$@.manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$@.manifest and $@.manifest'; \
-diff --git a/js/src/shell/moz.build b/js/src/shell/moz.build
---- a/js/src/shell/moz.build
-+++ b/js/src/shell/moz.build
-@@ -54,9 +54,9 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-
- 
- # Place a GDB Python auto-load file next to the shell executable, both in
- # the build directory and in the dist/bin directory.
- DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
- FINAL_TARGET_PP_FILES += ['js-gdb.py.in']
- OBJDIR_FILES.js.src.shell += ['!/dist/bin/js-gdb.py']
- 
- # People expect the js shell to wind up in the top-level JS dir.
--OBJDIR_FILES.js.src += ['!js%s' % CONFIG['BIN_SUFFIX']]
-+OBJDIR_FILES.js.src += ['!/dist/bin/js%s' % CONFIG['BIN_SUFFIX']]
-diff --git a/modules/libmar/tests/moz.build b/modules/libmar/tests/moz.build
---- a/modules/libmar/tests/moz.build
-+++ b/modules/libmar/tests/moz.build
-@@ -3,10 +3,10 @@
- # 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/.
- 
- XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
- 
- if CONFIG['OS_TARGET'] != 'Android':
-     TEST_HARNESS_FILES.xpcshell.modules.libmar.tests.unit += [
--        '!../tool/signmar%s' % CONFIG['BIN_SUFFIX'],
-+        '!/dist/bin/signmar%s' % CONFIG['BIN_SUFFIX'],
-     ]
-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
-@@ -1111,17 +1111,17 @@ class RecursiveMakeBackend(CommonBackend
-             interfaces_manifests = ' '.join(interfaces_manifests),
-             xpidl_rules=rules.getvalue(),
-             xpidl_modules=' '.join(xpt_modules),
-             xpt_files=' '.join(sorted(xpt_files - registered_xpt_files)),
-             registered_xpt_files=' '.join(sorted(registered_xpt_files)),
-         ))
- 
-     def _process_program(self, obj, backend_file):
--        backend_file.write('PROGRAM = %s\n' % obj.program)
-+        backend_file.write('PROGRAM = %s\n' % self._pretty_path(obj.output_path, backend_file))
-         if not obj.cxx_link and not self.environment.bin_suffix:
-             backend_file.write('PROG_IS_C_ONLY_%s := 1\n' % obj.program)
- 
-     def _process_host_program(self, program, backend_file):
-         backend_file.write('HOST_PROGRAM = %s\n' % program)
- 
-     def _process_rust_program_base(self, obj, backend_file,
-                                    target_variable,
-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
-@@ -12,16 +12,17 @@ All data structures of interest are chil
- Logic for populating these data structures is not defined in this class.
- Instead, what we have here are dumb container classes. The emitter module
- contains the code for converting executed mozbuild files into these data
- structures.
- """
- 
- from __future__ import absolute_import, unicode_literals
- 
-+from mozbuild.frontend.context import ObjDirPath
- from mozbuild.util import StrictOrderingOnAppendList
- from mozpack.chrome.manifest import ManifestEntry
- 
- import mozpack.path as mozpath
- from .context import FinalTargetValue
- 
- from collections import defaultdict, OrderedDict
- 
-@@ -80,16 +81,20 @@ class ContextDerived(TreeMetadata):
- 
-         self._context = context
- 
-     @property
-     def install_target(self):
-         return self._context['FINAL_TARGET']
- 
-     @property
-+    def installed(self):
-+        return self._context['DIST_INSTALL'] is not False
-+
-+    @property
-     def defines(self):
-         defines = self._context['DEFINES']
-         return Defines(self._context, defines) if defines else None
- 
-     @property
-     def relobjdir(self):
-         return mozpath.relpath(self.objdir, self.topobjdir)
- 
-@@ -409,16 +414,23 @@ class BaseProgram(Linkable):
-         Linkable.__init__(self, context)
- 
-         bin_suffix = context.config.substs.get(self.SUFFIX_VAR, '')
-         if not program.endswith(bin_suffix):
-             program += bin_suffix
-         self.program = program
-         self.is_unit_test = is_unit_test
- 
-+    @property
-+    def output_path(self):
-+        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)
- 
- 
- class Program(BaseProgram):
-     """Context derived container object for PROGRAM"""
-     SUFFIX_VAR = 'BIN_SUFFIX'
-     KIND = 'target'
-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
-@@ -760,17 +760,18 @@ class TreeMetadataEmitter(LoggingMixin):
-                              'GENERATED_FILES: %s') % (symbols_file,), context)
-                     shared_args['symbols_file'] = symbols_file.target_basename
- 
-             if shared_lib:
-                 lib = SharedLibrary(context, libname, **shared_args)
-                 self._libs[libname].append(lib)
-                 self._linkage.append((context, lib, 'USE_LIBS'))
-                 linkables.append(lib)
--                generated_files.add(lib.lib_name)
-+                if not lib.installed:
-+                    generated_files.add(lib.lib_name)
-                 if symbols_file and isinstance(symbols_file, SourcePath):
-                     script = mozpath.join(
-                         mozpath.dirname(mozpath.dirname(__file__)),
-                         'action', 'generate_symbols_file.py')
-                     defines = ()
-                     if lib.defines:
-                         defines = lib.defines.get_defines()
-                     yield GeneratedFile(context, script,
-diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py
---- a/toolkit/crashreporter/tools/symbolstore.py
-+++ b/toolkit/crashreporter/tools/symbolstore.py
-@@ -610,31 +610,50 @@ class Dumper:
- 
-         elapsed = time.time() - t_start
-         print('Finished processing %s in %.2fs' % (file, elapsed),
-               file=sys.stderr)
- 
- # Platform-specific subclasses.  For the most part, these just have
- # logic to determine what files to extract symbols from.
- 
-+def locate_pdb(path):
-+    '''Given a path to a binary, attempt to locate the matching pdb file with simple heuristics:
-+    * Look for a pdb file with the same base name next to the binary
-+    * Look for a pdb file with the same base name in the cwd
-+
-+    Returns the path to the pdb file if it exists, or None if it could not be located.
-+    '''
-+    path, ext = os.path.splitext(path)
-+    pdb = path + '.pdb'
-+    if os.path.isfile(pdb):
-+        return pdb
-+    # If there's no pdb next to the file, see if there's a pdb with the same root name
-+    # in the cwd. We build some binaries directly into dist/bin, but put the pdb files
-+    # in the relative objdir, which is the cwd when running this script.
-+    base = os.path.basename(pdb)
-+    pdb = os.path.join(os.getcwd(), base)
-+    if os.path.isfile(pdb):
-+        return pdb
-+    return None
-+
- class Dumper_Win32(Dumper):
-     fixedFilenameCaseCache = {}
- 
-     def ShouldProcess(self, file):
-         """This function will allow processing of exe or dll files that have pdb
-         files with the same base name next to them."""
-         if file.endswith(".exe") or file.endswith(".dll"):
--            path, ext = os.path.splitext(file)
--            if os.path.isfile(path + ".pdb"):
-+            if locate_pdb(file) is not None:
-                 return True
-         return False
- 
- 
-     def CopyDebug(self, file, debug_file, guid, code_file, code_id):
--        file = "%s.pdb" % os.path.splitext(file)[0]
-+        file = locate_pdb(file)
-         def compress(path):
-             compressed_file = path[:-1] + '_'
-             # ignore makecab's output
-             makecab = buildconfig.substs['MAKECAB']
-             success = subprocess.call([makecab, "-D",
-                                        "CompressionType=MSZIP",
-                                        path, compressed_file],
-                                       stdout=open(os.devnull, 'w'),
-diff --git a/toolkit/crashreporter/tools/unit-symbolstore.py b/toolkit/crashreporter/tools/unit-symbolstore.py
---- a/toolkit/crashreporter/tools/unit-symbolstore.py
-+++ b/toolkit/crashreporter/tools/unit-symbolstore.py
-@@ -464,18 +464,17 @@ class TestFunctional(HelperMixin, unitte
-             else:
-                 self.dump_syms = os.path.join(self.topsrcdir,
-                                               'toolkit',
-                                               'crashreporter',
-                                               'tools',
-                                               'win32',
-                                               'dump_syms_vc{_MSC_VER}.exe'.format(**buildconfig.substs))
-             self.target_bin = os.path.join(buildconfig.topobjdir,
--                                           'browser',
--                                           'app',
-+                                           'dist', 'bin',
-                                            'firefox.exe')
-         else:
-             self.dump_syms = os.path.join(buildconfig.topobjdir,
-                                           'dist', 'host', 'bin',
-                                           'dump_syms')
-             self.target_bin = os.path.join(buildconfig.topobjdir,
-                                            'dist', 'bin', 'firefox')
- 
-@@ -484,26 +483,28 @@ class TestFunctional(HelperMixin, unitte
-         HelperMixin.tearDown(self)
- 
-     def testSymbolstore(self):
-         if self.skip_test:
-             raise unittest.SkipTest('Skipping test in non-Firefox product')
-         dist_include_manifest = os.path.join(buildconfig.topobjdir,
-                                              '_build_manifests/install/dist_include')
-         dist_include = os.path.join(buildconfig.topobjdir, 'dist/include')
-+        browser_app = os.path.join(buildconfig.topobjdir, 'browser/app')
-         output = subprocess.check_output([sys.executable,
-                                           self.script_path,
-                                           '--vcs-info',
-                                           '-s', self.topsrcdir,
-                                           '--install-manifest=%s,%s' % (dist_include_manifest,
-                                                                         dist_include),
-                                           self.dump_syms,
-                                           self.test_dir,
-                                           self.target_bin],
--                                         stderr=open(os.devnull, 'w'))
-+                                         stderr=open(os.devnull, 'w'),
-+                                         cwd=browser_app)
-         lines = filter(lambda x: x.strip(), output.splitlines())
-         self.assertEqual(1, len(lines),
-                          'should have one filename in the output')
-         symbol_file = os.path.join(self.test_dir, lines[0])
-         self.assertTrue(os.path.isfile(symbol_file))
-         symlines = open(symbol_file, 'r').readlines()
-         file_lines = [l for l in symlines if l.startswith('FILE')]
-         def check_hg_path(lines, match):

+ 0 - 78
bug1240930-253/frg-mozilla/1255485-2-61a1.patch

@@ -1,78 +0,0 @@
-# HG changeset patch
-# User Ted Mielczarek <ted@mielczarek.org>
-# Date 1511382606 18000
-# Node ID 6fffc6fbb8c9fab9b61c3fe54894e85e116f30df
-# Parent  adc0e66cba9e0dd113853367ea12ae4a2ed3583d
-bug 1255485 - Remove NSDISTMODE=copy from Makefiles. r=nalexander
-
-MozReview-Commit-ID: GJV2O6zvEx2
-
-diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
---- a/browser/app/Makefile.in
-+++ b/browser/app/Makefile.in
-@@ -12,20 +12,16 @@ AB_CD = en-US
- ifndef MOZ_WINCONSOLE
- ifneq (,$(MOZ_DEBUG)$(MOZ_ASAN))
- MOZ_WINCONSOLE = 1
- else
- MOZ_WINCONSOLE = 0
- endif
- endif
- 
--# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
--# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
--NSDISTMODE = copy
--
- include $(topsrcdir)/config/config.mk
- 
- # If we are trying to show an error dialog about the lack of SSE2 support,
- # make sure that code itself doesn't use SSE2.
- ifdef MOZ_LINUX_32_SSE2_STARTUP_ERROR
- CXX := $(filter-out -march=% -msse -msse2 -mfpmath=sse,$(CXX))
- CXX += -march=pentiumpro
- endif
-diff --git a/ipc/app/Makefile.in b/ipc/app/Makefile.in
---- a/ipc/app/Makefile.in
-+++ b/ipc/app/Makefile.in
-@@ -5,20 +5,16 @@
- ifndef MOZ_WINCONSOLE
- ifdef MOZ_DEBUG
- MOZ_WINCONSOLE = 1
- else
- MOZ_WINCONSOLE = 0
- endif
- endif
- 
--# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
--# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
--NSDISTMODE = copy
--
- include $(topsrcdir)/config/config.mk
- 
- include $(topsrcdir)/config/rules.mk
- 
- ifneq ($(MOZ_WIDGET_TOOLKIT),android)
- #LIBS += ../contentproc/$(LIB_PREFIX)plugin-container.$(LIB_SUFFIX)
- endif
- 
-diff --git a/ipc/ipdl/test/cxx/app/Makefile.in b/ipc/ipdl/test/cxx/app/Makefile.in
-deleted file mode 100644
---- a/ipc/ipdl/test/cxx/app/Makefile.in
-+++ /dev/null
-@@ -1,5 +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/.
--
--NSDISTMODE = copy
-diff --git a/js/xpconnect/shell/Makefile.in b/js/xpconnect/shell/Makefile.in
-deleted file mode 100644
---- a/js/xpconnect/shell/Makefile.in
-+++ /dev/null
-@@ -1,6 +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/.
--
--NSDISTMODE = copy

+ 0 - 31
bug1240930-253/frg-mozilla/1255485-3-61a1.patch

@@ -1,31 +0,0 @@
-# HG changeset patch
-# User Ted Mielczarek <ted@mielczarek.org>
-# Date 1511382661 18000
-# Node ID 5888578c22f8dc006cfd6a405c9fc53b2df73b44
-# Parent  2a15a886f211d4a1e29cfc66a0fb198f44879a61
-bug 1255485 - Remove NSDISTMODE=copy support from config.mk. r=nalexander
-
-MozReview-Commit-ID: L5Pe4NexbJD
-
-diff --git a/config/config.mk b/config/config.mk
---- a/config/config.mk
-+++ b/config/config.mk
-@@ -337,17 +337,17 @@ endif # WINNT
- 
- ifeq (,$(CROSS_COMPILE)$(filter-out WINNT, $(OS_ARCH)))
- INSTALL = $(NSINSTALL) -t
- 
- else
- 
- # This isn't laid out as conditional directives so that NSDISTMODE can be
- # target-specific.
--INSTALL         = $(if $(filter copy, $(NSDISTMODE)), $(NSINSTALL) -t, $(if $(filter absolute_symlink, $(NSDISTMODE)), $(NSINSTALL) -L $(PWD), $(NSINSTALL) -R))
-+INSTALL         = $(if $(filter absolute_symlink, $(NSDISTMODE)), $(NSINSTALL) -L $(PWD), $(NSINSTALL) -R)
- 
- endif # WINNT
- 
- # The default for install_cmd is simply INSTALL
- install_cmd ?= $(INSTALL) $(1)
- 
- # Use nsinstall in copy mode to install files on the system
- SYSINSTALL	= $(NSINSTALL) -t

+ 0 - 37
bug1240930-253/frg-mozilla/1255485-4-61a1.patch

@@ -1,37 +0,0 @@
-# HG changeset patch
-# User Ted Mielczarek <ted@mielczarek.org>
-# Date 1511791411 18000
-# Node ID 465358fef0d2f6074595d70918d5393bbbbd77d9
-# Parent  7c06b2f016a9ec5ca68b68b87271845fea2a01cc
-bug 1255485 - force import libraries to be generated in objdir, not dist/bin. r=chmanchester
-
-The MSVC linker winds up generating import libraries when linking some of
-our executables, presumably because they contain functions that are
-__declspec(dllexport). By default the import libraries get written
-alongside the exe, so we force them to be written to the objdir so they don't
-clutter up dist/bin.
-
-MozReview-Commit-ID: 7DTfCo3OdDQ
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -548,17 +548,17 @@ 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))
- 	$(REPORT_BUILD)
- 	@$(RM) $@.manifest
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(EXPAND_LINK) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
-+	$(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)
- 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; \

+ 0 - 224
bug1240930-253/frg-mozilla/1255485-5-61a1.patch

@@ -1,224 +0,0 @@
-# HG changeset patch
-# User Ted Mielczarek <ted@mielczarek.org>
-# Date 1516205959 18000
-# Node ID 02e71426ed3e13eecc04ba8184c18b398dca3f67
-# Parent  707dd399a7460d786c5a77ddaeb9f5ccb787125b
-bug 1255485 - add some tests for building programs in dist/bin. r=nalexander
-
-MozReview-Commit-ID: 94uOsInnWmT
-
-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
-@@ -183,16 +183,24 @@ CONFIGS = defaultdict(lambda: {
-             'RUST_TARGET': 'x86_64-unknown-linux-gnu',
-             'LIB_PREFIX': 'lib',
-             'RUST_LIB_PREFIX': 'lib',
-             'LIB_SUFFIX': 'a',
-             'RUST_LIB_SUFFIX': 'a',
-             'OS_TARGET': 'Darwin',
-         },
-     },
-+    'program-paths': {
-+        'defines': {},
-+        'non_global_defines': [],
-+        'substs': {
-+            'COMPILE_ENVIRONMENT': '1',
-+            'BIN_SUFFIX': '.prog',
-+        },
-+    },
- })
- 
- 
- 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/program-paths/dist-bin/moz.build b/python/mozbuild/mozbuild/test/backend/data/program-paths/dist-bin/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/program-paths/dist-bin/moz.build
-@@ -0,0 +1,4 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+Program('dist-bin')
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/program-paths/dist-subdir/moz.build b/python/mozbuild/mozbuild/test/backend/data/program-paths/dist-subdir/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/program-paths/dist-subdir/moz.build
-@@ -0,0 +1,5 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+DIST_SUBDIR = 'foo'
-+Program('dist-subdir')
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/backend/data/program-paths/final-target/moz.build b/python/mozbuild/mozbuild/test/backend/data/program-paths/final-target/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/program-paths/final-target/moz.build
-@@ -0,0 +1,5 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+FINAL_TARGET = 'final/target'
-+Program('final-target')
-diff --git a/python/mozbuild/mozbuild/test/backend/data/program-paths/moz.build b/python/mozbuild/mozbuild/test/backend/data/program-paths/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/program-paths/moz.build
-@@ -0,0 +1,13 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+@template
-+def Program(name):
-+    PROGRAM = name
-+
-+DIRS += [
-+    'dist-bin',
-+    'dist-subdir',
-+    'final-target',
-+    'not-installed',
-+]
-diff --git a/python/mozbuild/mozbuild/test/backend/data/program-paths/not-installed/moz.build b/python/mozbuild/mozbuild/test/backend/data/program-paths/not-installed/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/backend/data/program-paths/not-installed/moz.build
-@@ -0,0 +1,5 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+DIST_INSTALL = False
-+Program('not-installed')
-\ 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
-@@ -1021,11 +1021,30 @@ class TestRecursiveMakeBackend(BackendTe
-         # Only mochitest.js should be in the install manifest.
-         self.assertTrue('testing/mochitest/tests/mochitest.js' in m)
- 
-         # The path is odd here because we do not normalize at test manifest
-         # processing time.  This is a fragile test because there's currently no
-         # way to iterate the manifest.
-         self.assertFalse('instrumentation/./not_packaged.java' in m)
- 
-+    def test_program_paths(self):
-+        """PROGRAMs with various moz.build settings that change the destination should produce
-+        the expected paths in backend.mk."""
-+        env = self._consume('program-paths', RecursiveMakeBackend)
-+
-+        expected = [
-+            ('dist-bin', '$(DEPTH)/dist/bin/dist-bin.prog'),
-+            ('dist-subdir', '$(DEPTH)/dist/bin/foo/dist-subdir.prog'),
-+            ('final-target', '$(DEPTH)/final/target/final-target.prog'),
-+            ('not-installed', 'not-installed.prog'),
-+        ]
-+        prefix = 'PROGRAM = '
-+        for (subdir, expected_program) in expected:
-+            with open(os.path.join(env.topobjdir, subdir, 'backend.mk'), 'rb') as fh:
-+                lines = fh.readlines()
-+                program = [line.rstrip().split(prefix, 1)[1] for line in lines
-+                           if line.startswith(prefix)][0]
-+                self.assertEqual(program, expected_program)
-+
- 
- if __name__ == '__main__':
-     main()
-diff --git a/python/mozbuild/mozbuild/test/frontend/data/program-paths/dist-bin/moz.build b/python/mozbuild/mozbuild/test/frontend/data/program-paths/dist-bin/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/frontend/data/program-paths/dist-bin/moz.build
-@@ -0,0 +1,4 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+Program('dist-bin')
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/frontend/data/program-paths/dist-subdir/moz.build b/python/mozbuild/mozbuild/test/frontend/data/program-paths/dist-subdir/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/frontend/data/program-paths/dist-subdir/moz.build
-@@ -0,0 +1,5 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+DIST_SUBDIR = 'foo'
-+Program('dist-subdir')
-\ No newline at end of file
-diff --git a/python/mozbuild/mozbuild/test/frontend/data/program-paths/final-target/moz.build b/python/mozbuild/mozbuild/test/frontend/data/program-paths/final-target/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/frontend/data/program-paths/final-target/moz.build
-@@ -0,0 +1,5 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+FINAL_TARGET = 'final/target'
-+Program('final-target')
-diff --git a/python/mozbuild/mozbuild/test/frontend/data/program-paths/moz.build b/python/mozbuild/mozbuild/test/frontend/data/program-paths/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/frontend/data/program-paths/moz.build
-@@ -0,0 +1,13 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+@template
-+def Program(name):
-+    PROGRAM = name
-+
-+DIRS += [
-+    'dist-bin',
-+    'dist-subdir',
-+    'final-target',
-+    'not-installed',
-+]
-diff --git a/python/mozbuild/mozbuild/test/frontend/data/program-paths/not-installed/moz.build b/python/mozbuild/mozbuild/test/frontend/data/program-paths/not-installed/moz.build
-new file mode 100644
---- /dev/null
-+++ b/python/mozbuild/mozbuild/test/frontend/data/program-paths/not-installed/moz.build
-@@ -0,0 +1,5 @@
-+# Any copyright is dedicated to the Public Domain.
-+# http://creativecommons.org/publicdomain/zero/1.0/
-+
-+DIST_INSTALL = False
-+Program('not-installed')
-\ No newline at end of file
-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
-@@ -648,16 +648,29 @@ class TestEmitterBasic(unittest.TestCase
-         self.assertIsInstance(objs[2], Program)
-         self.assertIsInstance(objs[3], SimpleProgram)
-         self.assertIsInstance(objs[4], SimpleProgram)
- 
-         self.assertEqual(objs[2].program, 'test_program.prog')
-         self.assertEqual(objs[3].program, 'test_program1.prog')
-         self.assertEqual(objs[4].program, 'test_program2.prog')
- 
-+    def test_program_paths(self):
-+        """Various moz.build settings that change the destination of PROGRAM should be
-+        accurately reflected in Program.output_path."""
-+        reader = self.reader('program-paths')
-+        objs = self.read_topsrcdir(reader)
-+        prog_paths = [o.output_path for o in objs if isinstance(o, Program)]
-+        self.assertEqual(prog_paths, [
-+            '!/dist/bin/dist-bin.prog',
-+            '!/dist/bin/foo/dist-subdir.prog',
-+            '!/final/target/final-target.prog',
-+            '!not-installed.prog',
-+        ])
-+
-     def test_test_manifest_missing_manifest(self):
-         """A missing manifest file should result in an error."""
-         reader = self.reader('test-manifest-missing-manifest')
- 
-         with self.assertRaisesRegexp(BuildReaderError, 'IOError: Missing files'):
-             self.read_topsrcdir(reader)
- 
-     def test_empty_test_manifest_rejected(self):

+ 0 - 45
bug1240930-253/frg-mozilla/1255485-6-61a1.patch

@@ -1,45 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1521493652 25200
-# Node ID 7862033a42ab4689c373b64bd363db081ffaee0d
-# Parent  fc9796ade5b59c1ca6b030ce55d85a8ad0d758b9
-Bug 1255485 - Don't assume target path is srcdir relative when locating a program's manifest on windows. r=ted
-
-MozReview-Commit-ID: L5BVxWGtpeN
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -551,26 +551,26 @@ endif
- #
- $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(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)
- 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; \
-+		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; \
- 		fi; \
--	elif test -f '$(srcdir)/$@.manifest'; then \
--		echo 'Embedding manifest from $(srcdir)/$@.manifest'; \
--		$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$@.manifest' -OUTPUTRESOURCE:$@\;1; \
-+	elif test -f '$(srcdir)/$(notdir $@).manifest'; then \
-+		echo 'Embedding manifest from $(srcdir)/$(notdir $@).manifest'; \
-+		$(MT) -NOLOGO -MANIFEST '$(win_srcdir)/$(notdir $@).manifest' -OUTPUTRESOURCE:$@\;1; \
- 	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

+ 0 - 100
bug1240930-253/frg-mozilla/1360650-1only-59a1.patch

@@ -1,100 +0,0 @@
-# HG changeset patch
-# User Ting-Yu Chou <janus926@gmail.com>
-# Date 1513614362 18000
-#      Mon Dec 18 11:26:02 2017 -0500
-# Node ID 8e4a0ea53ed3473647e335a2bc9d9ce8457ece30
-# Parent  f2ace5ae53088c9f3fa48eaf8533ec3a50e2418a
-Bug 1360650 part 1 - Archive pdb files of the binaries for llvm-symbolizer. r=ted
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -791,32 +791,42 @@ ifdef ASFILES
- $(ASOBJS):
- 	$(REPORT_BUILD_VERBOSE)
- 	$(AS) $(ASOUTOPTION)$@ $(ASFLAGS) $($(notdir $<)_FLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
- endif
- 
- define syms_template
- syms:: $(2)
- $(2): $(1)
-+ifdef MOZ_CRASHREPORTER
- 	$$(call py_action,dumpsymbols,$$(abspath $$<) $$(abspath $$@))
-+endif
- endef
- 
- ifndef MOZ_PROFILE_GENERATE
- ifneq (,$(filter $(DIST)/bin%,$(FINAL_TARGET)))
- DUMP_SYMS_TARGETS := $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS)
- endif
- endif
- 
- ifdef MOZ_AUTOMATION
- ifeq (,$(filter 1,$(MOZ_AUTOMATION_BUILD_SYMBOLS)))
- DUMP_SYMS_TARGETS :=
- endif
- endif
- 
-+ifdef MOZ_CRASHREPORTER
- $(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(file)_syms.track)))
-+else ifneq (,$(and $(LLVM_SYMBOLIZER),$(filter WINNT,$(OS_ARCH)),$(MOZ_AUTOMATION)))
-+$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(addsuffix .pdb,$(basename $(file))))))
-+PDB_FILES = $(addsuffix .pdb,$(basename $(DUMP_SYMS_TARGETS)))
-+PDB_DEST ?= $(FINAL_TARGET)
-+PDB_TARGET = target
-+INSTALL_TARGETS += PDB
-+endif
- 
- cargo_host_flag := --target=$(RUST_HOST_TARGET)
- cargo_target_flag := --target=$(RUST_TARGET)
- 
- # Permit users to pass flags to cargo from their mozconfigs (e.g. --color=always).
- cargo_build_flags = $(CARGOFLAGS)
- ifndef MOZ_DEBUG_RUST
- cargo_build_flags += --release
-diff --git a/toolkit/mozapps/installer/packager.py b/toolkit/mozapps/installer/packager.py
---- a/toolkit/mozapps/installer/packager.py
-+++ b/toolkit/mozapps/installer/packager.py
-@@ -18,16 +18,17 @@ from mozpack.files import (
-     FileFinder,
-     File,
- )
- from mozpack.copier import (
-     FileCopier,
-     Jarrer,
- )
- from mozpack.errors import errors
-+from mozpack.files import ExecutableFile
- from mozpack.mozjar import JAR_BROTLI
- import mozpack.path as mozpath
- import buildconfig
- from argparse import ArgumentParser
- from createprecomplete import generate_precomplete
- import os
- from StringIO import StringIO
- import subprocess
-@@ -308,16 +309,24 @@ def main():
-                 libbase = mozpath.join(respath, '%s%s') \
-                     % (buildconfig.substs['DLL_PREFIX'], lib)
-                 libname = '%s%s' % (libbase, buildconfig.substs['DLL_SUFFIX'])
-                 if copier.contains(libname):
-                     copier.add(libbase + '.chk',
-                                LibSignFile(os.path.join(args.destination,
-                                                         libname)))
- 
-+    # Include pdb files for llvm-symbolizer to resolve symbols.
-+    if buildconfig.substs.get('LLVM_SYMBOLIZER') and mozinfo.isWin:
-+        for p, f in copier:
-+            if isinstance(f, ExecutableFile):
-+                pdbname = os.path.splitext(f.inputs()[0])[0] + '.pdb'
-+                if os.path.exists(pdbname):
-+                    copier.add(os.path.basename(pdbname), File(pdbname))
-+
-     # Setup preloading
-     if args.jarlog and os.path.exists(args.jarlog):
-         from mozpack.mozjar import JarLog
-         log = JarLog(args.jarlog)
-         for p, f in copier:
-             if not isinstance(f, Jarrer):
-                 continue
-             key = JarLog.canonicalize(os.path.join(args.destination, p))

+ 0 - 46
bug1240930-253/frg-mozilla/1373878-1-58a1.patch

@@ -1,46 +0,0 @@
-# HG changeset patch
-# User Nathan Froyd <froydnj@mozilla.com>
-# Date 1506950482 14400
-#      Mon Oct 02 09:21:22 2017 -0400
-# Node ID 5e3876cd293defaca3a4a8c9ba71b134fd0f5740
-# Parent  373e346422e11aa0201d7d67499c31a66f7e396d
-Bug 1373878 - part 1 - add --enable-rust-tests configure option; r=rillian
-
-Because Rust tests require panic=unwind crates and therefore recompiling
-all crates we normally use (since most of our crates use panic=abort),
-we've elected to enable Rust tests only if the user asks for it.  Hence,
-this configure option.
-
-The configure option also enables build-time execution of the crates,
-since it's not straightforward to determine at configure time the name
-of the test binary Cargo will produce (Cargo produces test binaries of
-the form ${NAME}-${HEX_FINGERPRINT}, but there's no way to determine
-what ${HEX_FINGERPRINT} is without actually compiling the test binary).
-
-diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
---- a/build/moz.configure/rust.configure
-+++ b/build/moz.configure/rust.configure
-@@ -306,16 +306,23 @@ set_config('RUST_TARGET_ENV_NAME', rust_
- 
- # This is used for putting source info into symbol files.
- set_config('RUSTC_COMMIT', depends(rustc_info)(lambda i: i.commit))
- 
- # Until we remove all the other Rust checks in old-configure.
- add_old_configure_assignment('RUSTC', rustc)
- add_old_configure_assignment('RUST_TARGET', rust_target_triple)
- 
-+# This option is separate from --enable-tests because Rust tests are particularly
-+# expensive in terms of compile time (especially for code in libxul).
-+option('--enable-rust-tests',
-+       help='Enable building of Rust tests, and build-time execution of them')
-+
-+set_config('MOZ_RUST_TESTS', depends('--enable-rust-tests')(lambda v: bool(v)))
-+
- option(env='WIN64_LINK', nargs=1, help='Path to link.exe that targets win64')
- option(env='WIN64_LIB', nargs=1, help='Paths to libraries for the win64 linker')
- 
- set_config('WIN64_LINK', depends('WIN64_LINK')(lambda x: x))
- set_config('WIN64_LIB', depends('WIN64_LIB')(lambda x: x))
- 
- 
- @depends(target, rustc_info, c_compiler, 'WIN64_LINK', 'WIN64_LIB')

+ 0 - 257
bug1240930-253/frg-mozilla/1373878-2no345-58a1.patch

@@ -1,257 +0,0 @@
-# HG changeset patch
-# User Nathan Froyd <froydnj@mozilla.com>
-# Date 1506950482 14400
-#      Mon Oct 02 09:21:22 2017 -0400
-# Node ID 2dbb140bb423400ceb523377d2f74bee6a47edea
-# Parent  17f2ec08235e7b064033ad5bc283ee34038c67c3
-Bug 1373878 - part 2 - build system support for Rust tests; r=rillian
-
-diff --git a/build/templates.mozbuild b/build/templates.mozbuild
---- a/build/templates.mozbuild
-+++ b/build/templates.mozbuild
-@@ -155,10 +155,17 @@ def DisableStlWrapping():
- @template
- def NoVisibilityFlags():
-     COMPILE_FLAGS['VISIBILITY'] = []
- 
- @template
- def AllowCompilerWarnings():
-     COMPILE_FLAGS['WARNINGS_AS_ERRORS'] = []
- 
-+@template
-+def RustTest(name, features=None):
-+    RUST_TEST = name
-+
-+    if features:
-+        RUST_TEST_FEATURES = features
-+
- include('gecko_templates.mozbuild')
- include('test_templates.mozbuild')
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -965,16 +965,28 @@ force-cargo-library-build:
- 
- force-cargo-library-check:
- 	$(call CARGO_CHECK,$(target_cargo_env_vars)) --lib $(cargo_target_flag) $(rust_features_flag)
- else
- force-cargo-library-check:
- 	@true
- endif # RUST_LIBRARY_FILE
- 
-+ifdef RUST_TEST
-+
-+ifdef RUST_TEST_FEATURES
-+rust_features_flag := --features "$(RUST_TEST_FEATURES)"
-+endif
-+
-+force-cargo-test-run:
-+	$(call RUN_CARGO,test $(cargo_target_flag) -p $(RUST_TEST) $(rust_features_flag),$(target_cargo_env_vars))
-+
-+check:: force-cargo-test-run
-+endif
-+
- ifdef HOST_RUST_LIBRARY_FILE
- 
- ifdef HOST_RUST_LIBRARY_FEATURES
- host_rust_features_flag := --features "$(HOST_RUST_LIBRARY_FEATURES)"
- endif
- 
- force-cargo-host-library-build:
- 	$(REPORT_BUILD)
-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
-@@ -61,16 +61,17 @@ from ..frontend.data import (
-     LocalizedPreprocessedFiles,
-     ObjdirFiles,
-     ObjdirPreprocessedFiles,
-     PerSourceFlag,
-     Program,
-     RustLibrary,
-     HostRustLibrary,
-     RustProgram,
-+    RustTest,
-     SharedLibrary,
-     SimpleProgram,
-     Sources,
-     StaticLibrary,
-     TestManifest,
-     VariablePassthru,
-     XPIDLFile,
- )
-@@ -610,16 +611,19 @@ class RecursiveMakeBackend(CommonBackend
-             self._compile_graph[build_target]
- 
-         elif isinstance(obj, HostRustProgram):
-             self._process_host_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]
- 
-+        elif isinstance(obj, RustTest):
-+            self._process_rust_test(obj, backend_file)
-+
-         elif isinstance(obj, Program):
-             self._process_program(obj, backend_file)
-             self._process_linked_libraries(obj, backend_file)
-             self._no_skip['syms'].add(backend_file.relobjdir)
- 
-         elif isinstance(obj, HostProgram):
-             self._process_host_program(obj.program, backend_file)
-             self._process_linked_libraries(obj, backend_file)
-@@ -1137,16 +1141,22 @@ class RecursiveMakeBackend(CommonBackend
-                                         'RUST_PROGRAMS',
-                                         'RUST_CARGO_PROGRAMS')
- 
-     def _process_host_rust_program(self, obj, backend_file):
-         self._process_rust_program_base(obj, backend_file,
-                                         'HOST_RUST_PROGRAMS',
-                                         'HOST_RUST_CARGO_PROGRAMS')
- 
-+    def _process_rust_test(self, obj, backend_file):
-+        self._no_skip['check'].add(backend_file.relobjdir)
-+        backend_file.write_once('CARGO_FILE := $(srcdir)/Cargo.toml\n')
-+        backend_file.write_once('RUST_TEST := %s\n' % obj.name)
-+        backend_file.write_once('RUST_TEST_FEATURES := %s\n' % ' '.join(obj.features))
-+
-     def _process_simple_program(self, obj, backend_file):
-         if obj.is_unit_test:
-             backend_file.write('CPP_UNIT_TESTS += %s\n' % obj.program)
-             assert obj.cxx_link
-         else:
-             backend_file.write('SIMPLE_PROGRAMS += %s\n' % obj.program)
-             if not obj.cxx_link and not self.environment.bin_suffix:
-                 backend_file.write('PROG_IS_C_ONLY_%s := 1\n' % obj.program)
-@@ -1258,17 +1268,17 @@ class RecursiveMakeBackend(CommonBackend
-         backend_file.write_once('LIBRARY_NAME := %s\n' % libdef.basename)
-         backend_file.write('FORCE_STATIC_LIB := 1\n')
-         backend_file.write('REAL_LIBRARY := %s\n' % libdef.lib_name)
-         if libdef.no_expand_lib:
-             backend_file.write('NO_EXPAND_LIBS := 1\n')
- 
-     def _process_rust_library(self, libdef, backend_file):
-         backend_file.write_once('%s := %s\n' % (libdef.LIB_FILE_VAR, libdef.import_name))
--        backend_file.write('CARGO_FILE := $(srcdir)/Cargo.toml\n')
-+        backend_file.write_once('CARGO_FILE := $(srcdir)/Cargo.toml\n')
-         # Need to normalize the path so Cargo sees the same paths from all
-         # possible invocations of Cargo with this CARGO_TARGET_DIR.  Otherwise,
-         # Cargo's dependency calculations don't work as we expect and we wind
-         # up recompiling lots of things.
-         target_dir = mozpath.join(backend_file.objdir, libdef.target_dir)
-         target_dir = mozpath.normpath(target_dir)
-         backend_file.write('CARGO_TARGET_DIR := %s\n' % target_dir)
-         if libdef.features:
-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
-@@ -1249,16 +1249,30 @@ VARIABLES = {
- 
-     'HOST_RUST_LIBRARY_FEATURES': (List, list,
-         """Cargo features to activate for this host library.
- 
-         This variable should not be used directly; you should be using the
-         HostRustLibrary template instead.
-         """),
- 
-+    'RUST_TEST': (unicode, unicode,
-+        """Name of a Rust test to build and run via `cargo test`.
-+
-+        This variable should not be used directly; you should be using the
-+        RustTest template instead.
-+        """),
-+
-+    'RUST_TEST_FEATURES': (List, list,
-+        """Cargo features to activate for RUST_TEST.
-+
-+        This variable should not be used directly; you should be using the
-+        RustTest template instead.
-+        """),
-+
-     'UNIFIED_SOURCES': (ContextDerivedTypedList(SourcePath, StrictOrderingOnAppendList), list,
-         """Source code files that can be compiled together.
- 
-         This variable contains a list of source code files to compile,
-         that can be concatenated all together and built as a single source
-         file. This can help make the build faster and reduce the debug info
-         size.
-         """),
-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
-@@ -481,16 +481,28 @@ class RustProgram(BaseRustProgram):
- 
- 
- class HostRustProgram(BaseRustProgram):
-     SUFFIX_VAR = 'HOST_BIN_SUFFIX'
-     KIND = 'host'
-     TARGET_SUBST_VAR = 'RUST_HOST_TARGET'
- 
- 
-+class RustTest(ContextDerived):
-+    __slots__ = (
-+        'name',
-+        'features',
-+    )
-+
-+    def __init__(self, context, name, features):
-+        ContextDerived.__init__(self, context)
-+        self.name = name
-+        self.features = features
-+
-+
- class BaseLibrary(Linkable):
-     """Generic context derived container object for libraries."""
-     __slots__ = (
-         'basename',
-         'lib_name',
-         'import_name',
-         'refs',
-     )
-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
-@@ -62,16 +62,17 @@ from .data import (
-     ObjdirPreprocessedFiles,
-     PerSourceFlag,
-     PreprocessedTestWebIDLFile,
-     PreprocessedWebIDLFile,
-     Program,
-     RustLibrary,
-     HostRustLibrary,
-     RustProgram,
-+    RustTest,
-     SharedLibrary,
-     SimpleProgram,
-     Sources,
-     StaticLibrary,
-     TestHarnessFiles,
-     TestWebIDLFile,
-     TestManifest,
-     UnifiedSources,
-@@ -1214,16 +1215,25 @@ class TreeMetadataEmitter(LoggingMixin):
-                                          context);
- 
-         for c in components:
-             if c.endswith('.manifest'):
-                 yield ChromeManifestEntry(context, 'chrome.manifest',
-                                           Manifest('components',
-                                                    mozpath.basename(c)))
- 
-+        if self.config.substs.get('MOZ_RUST_TESTS', None):
-+            rust_test = context.get('RUST_TEST', None)
-+            if rust_test:
-+                # TODO: more sophisticated checking of the declared name vs.
-+                # contents of the Cargo.toml file.
-+                features = context.get('RUST_TEST_FEATURES', [])
-+
-+                yield RustTest(context, rust_test, features)
-+
-         for obj in self._process_test_manifests(context):
-             yield obj
- 
-         for obj in self._process_jar_manifests(context):
-             yield obj
- 
-         computed_as_flags.resolve_flags('MOZBUILD',
-                                         context.get('ASFLAGS'))

+ 0 - 185
bug1240930-253/frg-mozilla/1388423-57a1.patch

@@ -1,185 +0,0 @@
-# HG changeset patch
-# User Kartikaya Gupta <kgupta@mozilla.com>
-# Date 1502210095 14400
-# Node ID eda635af7fe2f97138a0109dffcd7afbbb2e7ce3
-# Parent  992a20fbff22d0ba0c70d9f056765c0ef8ac2591
-Bug 1388423 - Get full rust backtraces everywhere. r=jmaher
-
-MozReview-Commit-ID: 2Mfrpupz7As
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -895,17 +895,17 @@ define RUN_CARGO
- $(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env $(environment_cleaner) $(rustflags_override) $(sccache_wrap) \
- 	CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
- 	RUSTC=$(RUSTC) \
- 	MOZ_SRC=$(topsrcdir) \
- 	MOZ_DIST=$(ABS_DIST) \
- 	LIBCLANG_PATH="$(MOZ_LIBCLANG_PATH)" \
- 	CLANG_PATH="$(MOZ_CLANG_PATH)" \
- 	PKG_CONFIG_ALLOW_CROSS=1 \
--	RUST_BACKTRACE=1 \
-+	RUST_BACKTRACE=full \
- 	MOZ_TOPOBJDIR=$(topobjdir) \
- 	$(2) \
- 	$(CARGO) $(1) $(cargo_build_flags)
- endef
- 
- # This function is intended to be called by:
- #
- #   $(call CARGO_BUILD,EXTRA_ENV_VAR1=X EXTRA_ENV_VAR2=Y ...)
-diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
---- a/python/mozbuild/mozbuild/mach_commands.py
-+++ b/python/mozbuild/mozbuild/mach_commands.py
-@@ -1385,17 +1385,17 @@ class RunProgram(MachCommandBase):
- 
-             if not no_profile_option_given and setpref:
-                 print("setpref is only supported if a profile is not specified")
-                 return 1
- 
-         extra_env = {
-             'MOZ_DEVELOPER_REPO_DIR': self.topsrcdir,
-             'MOZ_DEVELOPER_OBJ_DIR': self.topobjdir,
--            'RUST_BACKTRACE': '1',
-+            'RUST_BACKTRACE': 'full',
-         }
- 
-         if not enable_crash_reporter:
-             extra_env['MOZ_CRASHREPORTER_DISABLE'] = '1'
-         else:
-             extra_env['MOZ_CRASHREPORTER'] = '1'
- 
-         if disable_e10s:
-diff --git a/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py b/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
---- a/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
-+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
-@@ -247,17 +247,17 @@ class FirefoxUITests(TestingMixin, VCSTo
-         tests = [os.path.join(dirs['abs_fxui_dir'], 'tests', test) for test in self.default_tests]
-         cmd.extend(tests)
- 
-         # Set further environment settings
-         env = env or self.query_env()
-         env.update({'MINIDUMP_SAVE_PATH': dirs['abs_blob_upload_dir']})
-         if self.query_minidump_stackwalk():
-             env.update({'MINIDUMP_STACKWALK': self.minidump_stackwalk_path})
--        env['RUST_BACKTRACE'] = '1'
-+        env['RUST_BACKTRACE'] = 'full'
- 
-         # If code coverage is enabled, set GCOV_PREFIX and JS_CODE_COVERAGE_OUTPUT_DIR env variables
-         if self.config.get('code_coverage'):
-             env['GCOV_PREFIX'] = self.gcov_dir
-             env['JS_CODE_COVERAGE_OUTPUT_DIR'] = self.jsvm_dir
- 
-         if self.config['allow_software_gl_layers']:
-             env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
-diff --git a/testing/mozharness/mozharness/mozilla/testing/talos.py b/testing/mozharness/mozharness/mozilla/testing/talos.py
---- a/testing/mozharness/mozharness/mozilla/testing/talos.py
-+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
-@@ -557,17 +557,17 @@ class Talos(TestingMixin, MercurialScrip
-         self.run_command([python, "--version"])
-         parser = TalosOutputParser(config=self.config, log_obj=self.log_obj,
-                                    error_list=TalosErrorList)
-         env = {}
-         env['MOZ_UPLOAD_DIR'] = self.query_abs_dirs()['abs_blob_upload_dir']
-         if not self.run_local:
-             env['MINIDUMP_STACKWALK'] = self.query_minidump_stackwalk()
-         env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
--        env['RUST_BACKTRACE'] = '1'
-+        env['RUST_BACKTRACE'] = 'full'
-         if not os.path.isdir(env['MOZ_UPLOAD_DIR']):
-             self.mkdir_p(env['MOZ_UPLOAD_DIR'])
-         env = self.query_env(partial_env=env, log_level=INFO)
-         # adjust PYTHONPATH to be able to use talos as a python package
-         if 'PYTHONPATH' in env:
-             env['PYTHONPATH'] = self.talos_path + os.pathsep + env['PYTHONPATH']
-         else:
-             env['PYTHONPATH'] = self.talos_path
-diff --git a/testing/mozharness/scripts/android_emulator_unittest.py b/testing/mozharness/scripts/android_emulator_unittest.py
---- a/testing/mozharness/scripts/android_emulator_unittest.py
-+++ b/testing/mozharness/scripts/android_emulator_unittest.py
-@@ -717,17 +717,17 @@ class AndroidEmulatorTest(BlobUploadMixi
-             cwd = self._query_tests_dir()
-         except:
-             self.fatal("Don't know how to run --test-suite '%s'!" % self.test_suite)
-         env = self.query_env()
-         if self.query_minidump_stackwalk():
-             env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
-         env['MOZ_UPLOAD_DIR'] = self.query_abs_dirs()['abs_blob_upload_dir']
-         env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
--        env['RUST_BACKTRACE'] = '1'
-+        env['RUST_BACKTRACE'] = 'full'
- 
-         self.info("Running on %s the command %s" % (self.emulator["name"], subprocess.list2cmdline(cmd)))
-         self.info("##### %s log begins" % self.test_suite)
- 
-         # TinderBoxPrintRe does not know about the '-debug' categories
-         aliases = {
-             'reftest-debug': 'reftest',
-             'jsreftest-debug': 'jsreftest',
-diff --git a/testing/mozharness/scripts/desktop_unittest.py b/testing/mozharness/scripts/desktop_unittest.py
---- a/testing/mozharness/scripts/desktop_unittest.py
-+++ b/testing/mozharness/scripts/desktop_unittest.py
-@@ -704,17 +704,17 @@ class DesktopUnittest(TestingMixin, Merc
-                     parser.formatter = ref_formatter.ReftestFormatter()
- 
-                 if self.query_minidump_stackwalk():
-                     env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
-                 if self.query_nodejs():
-                     env['MOZ_NODE_PATH'] = self.nodejs_path
-                 env['MOZ_UPLOAD_DIR'] = self.query_abs_dirs()['abs_blob_upload_dir']
-                 env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
--                env['RUST_BACKTRACE'] = '1'
-+                env['RUST_BACKTRACE'] = 'full'
-                 if not os.path.isdir(env['MOZ_UPLOAD_DIR']):
-                     self.mkdir_p(env['MOZ_UPLOAD_DIR'])
- 
-                 if self.config['allow_software_gl_layers']:
-                     env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
-                 if self.config['enable_webrender']:
-                     env['MOZ_WEBRENDER'] = '1'
- 
-diff --git a/testing/mozharness/scripts/marionette.py b/testing/mozharness/scripts/marionette.py
---- a/testing/mozharness/scripts/marionette.py
-+++ b/testing/mozharness/scripts/marionette.py
-@@ -311,17 +311,17 @@ class MarionetteTest(TestingMixin, Mercu
-         cmd.extend(self.query_tests_args(try_tests,
-                                          str_format_values=config_fmt_args))
- 
-         env = {}
-         if self.query_minidump_stackwalk():
-             env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
-         env['MOZ_UPLOAD_DIR'] = self.query_abs_dirs()['abs_blob_upload_dir']
-         env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
--        env['RUST_BACKTRACE'] = '1'
-+        env['RUST_BACKTRACE'] = 'full'
- 
-         if self.config['allow_software_gl_layers']:
-             env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
-         if self.config['enable_webrender']:
-             env['MOZ_WEBRENDER'] = '1'
- 
-         if not os.path.isdir(env['MOZ_UPLOAD_DIR']):
-             self.mkdir_p(env['MOZ_UPLOAD_DIR'])
-diff --git a/testing/mozharness/scripts/web_platform_tests.py b/testing/mozharness/scripts/web_platform_tests.py
---- a/testing/mozharness/scripts/web_platform_tests.py
-+++ b/testing/mozharness/scripts/web_platform_tests.py
-@@ -270,17 +270,17 @@ class WebPlatformTest(TestingMixin, Merc
-         self._install_fonts()
- 
-         parser = StructuredOutputParser(config=self.config,
-                                         log_obj=self.log_obj,
-                                         log_compact=True,
-                                         error_list=BaseErrorList + HarnessErrorList)
- 
-         env = {'MINIDUMP_SAVE_PATH': dirs['abs_blob_upload_dir']}
--        env['RUST_BACKTRACE'] = '1'
-+        env['RUST_BACKTRACE'] = 'full'
- 
-         if self.config['allow_software_gl_layers']:
-             env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
-         if self.config['enable_webrender']:
-             env['MOZ_WEBRENDER'] = '1'
-         if self.config['headless']:
-             env['MOZ_HEADLESS'] = '1'
-             env['MOZ_HEADLESS_WIDTH'] = self.config['headless_width']

+ 0 - 130
bug1240930-253/frg-mozilla/1414064-1-58a1.patch

@@ -1,130 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1510094084 28800
-#      Tue Nov 07 14:34:44 2017 -0800
-# Node ID 11bf83133ab4da9ac5beeb8686b74d474cf14c1e
-# Parent  98284ab6ed0394698a521c4e76b577da4ca0f872
-Bug 1414064 - Remove WRAP_LDFLAGS, it is never set in the build system. r=mshal
-
-MozReview-Commit-ID: Da4a4JmaxoL
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -579,17 +579,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) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
-+	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
- 	$(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) $@
-@@ -638,17 +638,17 @@ ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- 	$(EXPAND_LINK) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_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) $(WRAP_LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS)
-+	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS)
- 	$(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) $@
-@@ -702,17 +702,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_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- ifndef INCREMENTAL_LINKER
- 	$(RM) $@
- endif
--	$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS) $(SHLIB_LDENDFILE)
-+	$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS) $(SHLIB_LDENDFILE)
- 	$(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/js/src/old-configure.in b/js/src/old-configure.in
---- a/js/src/old-configure.in
-+++ b/js/src/old-configure.in
-@@ -1927,17 +1927,16 @@ AC_SUBST(HOST_LDFLAGS)
- AC_SUBST_LIST(HOST_OPTIMIZE_FLAGS)
- AC_SUBST(HOST_AR)
- AC_SUBST(HOST_AR_FLAGS)
- AC_SUBST(HOST_RANLIB)
- AC_SUBST(HOST_BIN_SUFFIX)
- 
- AC_SUBST(TARGET_XPCOM_ABI)
- 
--AC_SUBST(WRAP_LDFLAGS)
- AC_SUBST_LIST(DSO_CFLAGS)
- AC_SUBST_LIST(DSO_PIC_CFLAGS)
- AC_SUBST(DSO_LDOPTS)
- AC_SUBST(BIN_SUFFIX)
- AC_SUBST(USE_N32)
- AC_SUBST(CC_VERSION)
- AC_SUBST(MOZ_LINKER)
- AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
-diff --git a/old-configure.in b/old-configure.in
---- a/old-configure.in
-+++ b/old-configure.in
-@@ -4231,17 +4231,16 @@ AC_SUBST(HOST_BIN_SUFFIX)
- 
- AC_SUBST(TARGET_XPCOM_ABI)
- AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
- AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
- AC_SUBST(HAVE_X86_AVX2)
- AC_SUBST(HAVE_ALTIVEC)
- AC_SUBST(GCC_USE_GNU_LD)
- 
--AC_SUBST(WRAP_LDFLAGS)
- AC_SUBST_LIST(DSO_CFLAGS)
- AC_SUBST_LIST(DSO_PIC_CFLAGS)
- AC_SUBST(DSO_LDOPTS)
- AC_SUBST(BIN_SUFFIX)
- AC_SUBST(USE_N32)
- AC_SUBST(CC_VERSION)
- AC_SUBST(NS_ENABLE_TSF)
- AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
-@@ -4429,17 +4428,16 @@ if test -n "$_subconfigure_subdir"; then
-   ac_configure_args="$_subconfigure_config_args"
-   AC_OUTPUT_SUBDIRS_NOW("$_subconfigure_subdir",$cache_file)
-   ac_configure_args="$_save_ac_configure_args"
-   srcdir="$_save_srcdir"
- fi
- 
- if test "$COMPILE_ENVIRONMENT" -a "$MOZ_WIDGET_TOOLKIT"; then
- 
--export WRAP_LDFLAGS
- 
- dnl ========================================================
- dnl = Setup a nice relatively clean build environment for
- dnl = sub-configures.
- dnl ========================================================
- CC="$_SUBDIR_CC"
- CXX="$_SUBDIR_CXX"
- CFLAGS="$_SUBDIR_CFLAGS"

+ 0 - 70
bug1240930-253/frg-mozilla/1414064-2-58a1.patch

@@ -1,70 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1510094084 28800
-#      Tue Nov 07 14:34:44 2017 -0800
-# Node ID 243303b215cc2038d9edce914b422d9ac8d0ea93
-# Parent  3cbb5e1a52d7a3102c9527b5c747a6e2110fc61c
-Bug 1414064 - Remove EXE_DEF_FILE, it is never set in the build system. r=mshal
-
-MozReview-Commit-ID: IcCg4rZjpee
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -237,17 +237,17 @@ HOST_PROGRAM :=
- HOST_SIMPLE_PROGRAMS :=
- endif
- 
- ALL_TRASH = \
- 	$(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \
- 	$(filter-out $(ASFILES),$(OBJS:.$(OBJ_SUFFIX)=.s)) $(OBJS:.$(OBJ_SUFFIX)=.ii) \
- 	$(OBJS:.$(OBJ_SUFFIX)=.i) $(OBJS:.$(OBJ_SUFFIX)=.i_o) \
- 	$(HOST_PROGOBJS) $(HOST_OBJS) $(IMPORT_LIBRARY) \
--	$(EXE_DEF_FILE) so_locations _gen _stubs $(wildcard *.res) $(wildcard *.RES) \
-+	so_locations _gen _stubs $(wildcard *.res) $(wildcard *.RES) \
- 	$(wildcard *.pdb) $(CODFILE) $(IMPORT_LIBRARY) \
- 	$(SHARED_LIBRARY:$(DLL_SUFFIX)=.exp) $(wildcard *.ilk) \
- 	$(PROGRAM:$(BIN_SUFFIX)=.exp) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.exp) \
- 	$(PROGRAM:$(BIN_SUFFIX)=.lib) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.lib) \
- 	$(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.$(OBJ_SUFFIX)) \
- 	$(wildcard gts_tmp_*) $(LIBRARY:%.a=.%.timestamp)
- ALL_TRASH_DIRS = \
- 	$(GARBAGE_DIRS) /no-such-file
-@@ -554,17 +554,17 @@ 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) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
-+$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- 	@$(RM) $@.manifest
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
- 	$(EXPAND_LINK) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
- ifdef MSMANIFEST_TOOL
- 	@if test -f $@.manifest; then \
- 		if test -f '$(srcdir)/$@.manifest'; then \
- 			echo 'Embedding manifest from $(srcdir)/$@.manifest and $@.manifest'; \
-@@ -579,17 +579,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) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
-+	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS)
- 	$(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) $@

+ 0 - 34
bug1240930-253/frg-mozilla/1414064-3-58a1.patch

@@ -1,34 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1510094084 28800
-#      Tue Nov 07 14:34:44 2017 -0800
-# Node ID 3fcfca0277db249f72b9e49f432be89f188c5519
-# Parent  381ab4b56e6ad2defb1f9122335a5e62120829fe
-Bug 1414064 - Remove SHLIB_LD{START,END}FILE and SUB_SHLOBJS. r=mshal
-
-These are only set by nss' make build system, which we no longer use.
-
-MozReview-Commit-ID: 9XRhpDmlekK
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -702,17 +702,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_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- ifndef INCREMENTAL_LINKER
- 	$(RM) $@
- endif
--	$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS) $(SHLIB_LDENDFILE)
-+	$(EXPAND_MKSHLIB) $(OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(RUST_STATIC_LIB_FOR_SHARED_LIB) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(EXTRA_LIBS) $(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'; \

+ 0 - 151
bug1240930-253/frg-mozilla/1414064-4-58a1.patch

@@ -1,151 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1510094084 28800
-#      Tue Nov 07 14:34:44 2017 -0800
-# Node ID a3e9ac417280a142da238af07913e5e3a79dc47b
-# Parent  432516f861a1540d2fc282324ab2410f0e07a4ba
-Bug 1414064 - Remove references to EXTRA_LIBS in the build system. r=mshal
-
-MozReview-Commit-ID: AeD755whvIV
-
-diff --git a/config/makefiles/debugmake.mk b/config/makefiles/debugmake.mk
---- a/config/makefiles/debugmake.mk
-+++ b/config/makefiles/debugmake.mk
-@@ -82,17 +82,16 @@ showbuild:
- 		COMPILE_CXXFLAGS \
- 		COMPILE_CMFLAGS \
- 		COMPILE_CMMFLAGS \
- 		LDFLAGS \
- 		OS_LDFLAGS \
- 		DSO_LDOPTS \
- 		OS_INCLUDES \
- 		OS_LIBS \
--		EXTRA_LIBS \
- 		BIN_FLAGS \
- 		INCLUDES \
- 		DEFINES \
- 		ACDEFINES \
- 		BIN_SUFFIX \
- 		LIB_SUFFIX \
- 		RUST_LIB_SUFFIX \
- 		DLL_SUFFIX \
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -558,17 +558,17 @@ endif
- #
- # PROGRAM = Foo
- # creates OBJS, links with LIBS to create Foo
- #
- $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS)
- 	$(REPORT_BUILD)
- 	@$(RM) $@.manifest
- ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
--	$(EXPAND_LINK) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
-+	$(EXPAND_LINK) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_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; \
-@@ -579,17 +579,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) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS)
-+	$(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) $(BIN_FLAGS)
- 	$(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) $@
-@@ -630,25 +630,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_DEPS) $(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) $(EXTRA_LIBS) $(OS_LIBS)
-+	$(EXPAND_LINK) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(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) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS)
-+	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS) $(BIN_FLAGS)
- 	$(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) $@
-@@ -664,27 +664,27 @@ ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
- else
- 	$(EXPAND_LIBS_EXEC) -- $(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) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS)) $(EXTRA_DEPS) $(GLOBAL_DEPS)
-+$(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(STATIC_LIBS_DEPS) $(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 %.$(LIB_SUFFIX),$(EXTRA_LIBS))
-+	$(EXPAND_AR) $(AR_FLAGS) $(OBJS) $(STATIC_LIBS)
- 
--$(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $(OBJS) $(STATIC_LIBS_DEPS) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS)) $(EXTRA_DEPS) $(GLOBAL_DEPS)
-+$(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) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS))
-+	$(EXPAND_LIBS_GEN) -o $@ $(OBJS) $(STATIC_LIBS)
- 
- 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.
-@@ -702,17 +702,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_DEPS) $(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) $(EXTRA_LIBS) $(OS_LIBS)
-+	$(EXPAND_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'; \

+ 0 - 131
bug1240930-253/frg-mozilla/1414064-5-58a1.patch

@@ -1,131 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1510094084 28800
-#      Tue Nov 07 14:34:44 2017 -0800
-# Node ID 4d3264d16f13e6d8f38a6a9d9b6c62d8dfc10b9f
-# Parent  f58743a0e883236da6d9cd641ed8183fa0246093
-Bug 1414064 - Move BIN_FLAGS to MOZ_PROGRAM_LDFLAGS, get rid of BIN_FLAGS. r=mshal
-
-MozReview-Commit-ID: ELTiYvh6iuS
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -579,17 +579,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) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS) $(BIN_FLAGS)
-+	$(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 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) $@
-@@ -638,17 +638,17 @@ 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)
- 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) $(BIN_FLAGS)
-+	$(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 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) $@
-diff --git a/js/src/old-configure.in b/js/src/old-configure.in
---- a/js/src/old-configure.in
-+++ b/js/src/old-configure.in
-@@ -815,17 +815,17 @@ case "$target" in
- 
- *-netbsd*)
-     DSO_CFLAGS=''
-     CFLAGS="$CFLAGS -Dunix"
-     CXXFLAGS="$CXXFLAGS -Dunix"
-     if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
-         DSO_PIC_CFLAGS='-fPIC -DPIC'
-         DSO_LDOPTS='-shared'
--	BIN_FLAGS='-Wl,--export-dynamic'
-+        MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -Wl,--export-dynamic"
-     else
-     	DSO_PIC_CFLAGS='-fPIC -DPIC'
-     	DSO_LDOPTS='-shared'
-     fi
-     # This will fail on a.out systems prior to 1.5.1_ALPHA.
-     if test "$LIBRUNPATH"; then
- 	DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
-     fi
-@@ -1839,17 +1839,16 @@ AC_SUBST(AR)
- AC_SUBST(AR_FLAGS)
- AC_SUBST(AR_EXTRACT)
- AC_SUBST_LIST(ASFLAGS)
- AC_SUBST(RC)
- AC_SUBST(RCFLAGS)
- AC_SUBST(WINDRES)
- AC_SUBST(IMPLIB)
- AC_SUBST(FILTER)
--AC_SUBST(BIN_FLAGS)
- AC_SUBST_LIST(MOZ_DEBUG_LDFLAGS)
- AC_SUBST(WARNINGS_AS_ERRORS)
- AC_SUBST(LIBICONV)
- 
- AC_SUBST(ENABLE_STRIP)
- AC_SUBST(PKG_SKIP_STRIP)
- AC_SUBST(INCREMENTAL_LINKER)
- 
-diff --git a/old-configure.in b/old-configure.in
---- a/old-configure.in
-+++ b/old-configure.in
-@@ -1003,17 +1003,17 @@ case "$target" in
- 
- *-netbsd*)
-     DSO_CFLAGS=''
-     CFLAGS="$CFLAGS -Dunix"
-     CXXFLAGS="$CXXFLAGS -Dunix"
-     if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
-         DSO_PIC_CFLAGS='-fPIC -DPIC'
-         DSO_LDOPTS='-shared'
--        BIN_FLAGS='-Wl,--export-dynamic'
-+        MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -Wl,--export-dynamic"
-     else
-         DSO_PIC_CFLAGS='-fPIC -DPIC'
-         DSO_LDOPTS='-shared'
-     fi
-     # This will fail on a.out systems prior to 1.5.1_ALPHA.
-     if test "$LIBRUNPATH"; then
-         DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
-     fi
-@@ -3874,17 +3874,16 @@ AC_SUBST(AR_FLAGS)
- AC_SUBST(AR_EXTRACT)
- AC_SUBST(AS)
- AC_SUBST_LIST(ASFLAGS)
- AC_SUBST(RC)
- AC_SUBST(RCFLAGS)
- AC_SUBST(WINDRES)
- AC_SUBST(IMPLIB)
- AC_SUBST(FILTER)
--AC_SUBST(BIN_FLAGS)
- AC_SUBST(MOZ_AUTH_EXTENSION)
- AC_SUBST(MOZ_PREF_EXTENSIONS)
- AC_SUBST_LIST(MOZ_DEBUG_LDFLAGS)
- AC_SUBST(WARNINGS_AS_ERRORS)
- AC_SUBST_SET(MOZ_EXTENSIONS)
- AC_SUBST(MOZ_TOOLKIT_SEARCH)
- AC_SUBST(MOZ_FEEDS)
- 

+ 0 - 132
bug1240930-253/frg-mozilla/1414064-6-58a1.patch

@@ -1,132 +0,0 @@
-# HG changeset patch
-# User Chris Manchester <cmanchester@mozilla.com>
-# Date 1510094105 28800
-#      Tue Nov 07 14:35:05 2017 -0800
-# Node ID 0537b09e4117263cbcc80d4d766807f4ba261ec7
-# Parent  608714b63fba002948ef883cef1e0edbccb18816
-Bug 1414064 - Remove LD_VERSION_SCRIPT from the build system. r=mshal
-
-MozReview-Commit-ID: 6KOLZh6aQmc
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -332,26 +332,16 @@ ifeq ($(OS_ARCH),NetBSD)
- ifneq (,$(filter arc cobalt hpcmips mipsco newsmips pmax sgimips,$(OS_TEST)))
- ifneq (,$(filter layout/%,$(relativesrcdir)))
- OS_CFLAGS += -Wa,-xgot
- OS_CXXFLAGS += -Wa,-xgot
- endif
- endif
- endif
- 
--#
--# Linux: add -Bsymbolic flag for components
--#
--ifeq ($(OS_ARCH),Linux)
--ifdef LD_VERSION_SCRIPT
--EXTRA_DSO_LDOPTS += -Wl,--version-script,$(LD_VERSION_SCRIPT)
--EXTRA_DEPS += $(LD_VERSION_SCRIPT)
--endif
--endif
--
- ifdef SYMBOLS_FILE
- ifeq ($(OS_TARGET),WINNT)
- ifndef GNU_CC
- EXTRA_DSO_LDOPTS += -DEF:$(call normalizepath,$(SYMBOLS_FILE))
- else
- EXTRA_DSO_LDOPTS += $(call normalizepath,$(SYMBOLS_FILE))
- endif
- else
-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
-@@ -102,17 +102,16 @@ MOZBUILD_VARIABLES = [
-     b'HOST_CMMSRCS',
-     b'HOST_CXXFLAGS',
-     b'HOST_EXTRA_LIBS',
-     b'HOST_LIBRARY_NAME',
-     b'HOST_PROGRAM',
-     b'HOST_SIMPLE_PROGRAMS',
-     b'JAR_MANIFEST',
-     b'JAVA_JAR_TARGETS',
--    b'LD_VERSION_SCRIPT',
-     b'LIBRARY_NAME',
-     b'LIBS',
-     b'MAKE_FRAMEWORK',
-     b'MODULE',
-     b'NO_DIST_INSTALL',
-     b'NO_EXPAND_LIBS',
-     b'NO_INTERFACES_MANIFEST',
-     b'NO_JS_MANIFEST',
-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
-@@ -1622,22 +1622,16 @@ VARIABLES = {
-         """),
- 
-     'DEFFILE': (unicode, unicode,
-         """The program .def (module definition) file.
- 
-         This variable can only be used on Windows.
-         """),
- 
--    'LD_VERSION_SCRIPT': (unicode, unicode,
--        """The linker version script for shared libraries.
--
--        This variable can only be used on Linux.
--        """),
--
-     'SYMBOLS_FILE': (Path, unicode,
-         """A file containing a list of symbols to export from a shared library.
- 
-         The given file contains a list of symbols to be exported, and is
-         preprocessed.
-         A special marker "@DATA@" must be added after a symbol name if it
-         points to data instead of code, so that the Windows linker can treat
-         them correctly.
-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
-@@ -741,20 +741,20 @@ class TreeMetadataEmitter(LoggingMixin):
-                         context)
- 
-             symbols_file = context.get('SYMBOLS_FILE')
-             if symbols_file:
-                 if not shared_lib:
-                     raise SandboxValidationError(
-                         'SYMBOLS_FILE can only be used with a SHARED_LIBRARY.',
-                         context)
--                if context.get('DEFFILE') or context.get('LD_VERSION_SCRIPT'):
-+                if context.get('DEFFILE'):
-                     raise SandboxValidationError(
--                        'SYMBOLS_FILE cannot be used along DEFFILE or '
--                        'LD_VERSION_SCRIPT.', context)
-+                        'SYMBOLS_FILE cannot be used along DEFFILE.',
-+                        context)
-                 if isinstance(symbols_file, SourcePath):
-                     if not os.path.exists(symbols_file.full_path):
-                         raise SandboxValidationError(
-                             'Path specified in SYMBOLS_FILE does not exist: %s '
-                             '(resolved to %s)' % (symbols_file,
-                             symbols_file.full_path), context)
-                     shared_args['symbols_file'] = True
-                 else:
-@@ -970,17 +970,16 @@ class TreeMetadataEmitter(LoggingMixin):
-         passthru = VariablePassthru(context)
-         varlist = [
-             'EXTRA_DSO_LDOPTS',
-             'RCFILE',
-             'RESFILE',
-             'RCINCLUDE',
-             'DEFFILE',
-             'WIN32_EXE_LDFLAGS',
--            'LD_VERSION_SCRIPT',
-             'USE_EXTENSION_MANIFEST',
-             'NO_JS_MANIFEST',
-             'HAS_MISC_RULE',
-         ]
-         for v in varlist:
-             if v in context and context[v]:
-                 passthru.variables[v] = context[v]
- 

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

@@ -2,7 +2,7 @@
 # User Chris Manchester <cmanchester@mozilla.com>
 # Date 1521588665 25200
 # Node ID 36f505b0e0da72cbcd109ec7eeb2fb449f6da927
-# Parent  eef5caff081b8b774e7f31607a652aa56c7b8d7c
+# 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
@@ -10,7 +10,7 @@ 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
-@@ -424,16 +424,19 @@ class BaseProgram(Linkable):
+@@ -482,16 +482,19 @@ class BaseProgram(Linkable):
          if self.installed:
              return ObjDirPath(self._context, '!/' + mozpath.join(self.install_target, self.program))
          else:
@@ -30,7 +30,7 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
  
  
  class HostProgram(HostMixin, BaseProgram):
-@@ -531,16 +534,20 @@ class BaseLibrary(Linkable):
+@@ -596,16 +599,20 @@ class BaseLibrary(Linkable):
              )
              self.import_name = self.lib_name
  
@@ -54,7 +54,7 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
 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
-@@ -1116,19 +1116,25 @@ class TestEmitterBasic(unittest.TestCase
+@@ -1161,19 +1161,25 @@ class TestEmitterBasic(unittest.TestCase
  
      def test_linkables_cxx_link(self):
          """Test that linkables transitively set cxx_link properly."""

+ 14 - 16
bug1240930-253/frg-mozilla/1429875-4-61a1.patch

@@ -2,7 +2,7 @@
 # User Chris Manchester <cmanchester@mozilla.com>
 # Date 1521588665 25200
 # Node ID 7547d66e0f518d20f61b492eac027d5a34ac6fb4
-# Parent  59d0e2f57d34fdd5e1b6bf98f8cb0591811eb4aa
+# Parent  a798776b7132104fc4c93b59741ebf5054bd930c
 Bug 1429875 - Remove expandlibs and instead generate list files in the mozbuild backend. r=glandium
 
 MozReview-Commit-ID: 5eLwnh1HHGj
@@ -34,7 +34,7 @@ diff --git a/build/clang-plugin/Makefile.in b/build/clang-plugin/Makefile.in
 diff --git a/config/config.mk b/config/config.mk
 --- a/config/config.mk
 +++ b/config/config.mk
-@@ -432,28 +432,16 @@ JAVAC_FLAGS += -source 1.4
+@@ -421,28 +421,16 @@ JAVAC_FLAGS += -source 1.4
  
  ifdef MOZ_DEBUG
  JAVAC_FLAGS += -g
@@ -1357,26 +1357,24 @@ deleted file mode 100644
 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
-@@ -27,32 +27,39 @@ from mozbuild.frontend.data import (
+@@ -22,30 +22,37 @@ from mozbuild.frontend.data import (
+     BaseProgram,
+     ChromeManifestEntry,
+     ConfigFileSubstitution,
      Exports,
-     IPDLFile,
      FinalTargetPreprocessedFiles,
      FinalTargetFiles,
-     GeneratedEventWebIDLFile,
      GeneratedSources,
-     GeneratedWebIDLFile,
      GnProjectData,
 +    HostLibrary,
 +    HostRustLibrary,
-     PreprocessedTestWebIDLFile,
-     PreprocessedWebIDLFile,
+     IPDLCollection,
 +    RustLibrary,
      SharedLibrary,
 +    StaticLibrary,
-     TestWebIDLFile,
      UnifiedSources,
      XPIDLFile,
-     WebIDLFile,
+     WebIDLCollection,
  )
  from mozbuild.jar import (
      DeprecatedJarManifest,
@@ -1398,7 +1396,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
          self.topsrcdir = config.topsrcdir
          self.topobjdir = config.topobjdir
  
-@@ -349,16 +356,97 @@ class CommonBackend(BuildBackend):
+@@ -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:
@@ -1492,10 +1490,10 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
          self._generated_sources.update(mozpath.relpath(f, self.environment.topobjdir) for f in files)
  
      def _handle_webidl_collection(self, webidls):
-         if not webidls.all_stems():
-             return
  
          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
@@ -1623,7 +1621,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
 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
-@@ -200,16 +200,17 @@ CONFIGS = defaultdict(lambda: {
+@@ -209,16 +209,17 @@ CONFIGS = defaultdict(lambda: {
          'defines': {},
          'non_global_defines': [],
          'substs': {
@@ -1680,7 +1678,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.b
 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
-@@ -986,40 +986,34 @@ class TestRecursiveMakeBackend(BackendTe
+@@ -992,40 +992,34 @@ class TestRecursiveMakeBackend(BackendTe
  
              for line in lines:
                  self.assertNotIn('LIB_IS_C_ONLY', line)
@@ -1730,7 +1728,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
              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:
-@@ -1027,16 +1021,44 @@ class TestRecursiveMakeBackend(BackendTe
+@@ -1033,16 +1027,44 @@ class TestRecursiveMakeBackend(BackendTe
                  for val in expected_linkage[name][var]:
                      line = '%s += %s' % (var, val)
                      self.assertIn(line,

+ 78 - 5
bug1240930-253/frg-mozilla/1429875-5-PARTIAL-61a1.patch → bug1240930-253/frg-mozilla/1429875-5-61a1.patch

@@ -2,7 +2,7 @@
 # User Chris Manchester <cmanchester@mozilla.com>
 # Date 1521589452 25200
 # Node ID cd90d8ccc5be982afb1bab0a2f2a649e10491817
-# Parent  e52da97ac23e05403df80f3f8b2f6ceef06c27f8
+# Parent  5197d3500da2bbf39a50d399f355a3bca4a59726
 Bug 1429875 - Implement OBJ_SUFFIX overriding for the profile generation phase on linux in mozbuild. r=glandium
 
 MozReview-Commit-ID: 8PtgxfbxuE
@@ -10,7 +10,7 @@ MozReview-Commit-ID: 8PtgxfbxuE
 diff --git a/config/config.mk b/config/config.mk
 --- a/config/config.mk
 +++ b/config/config.mk
-@@ -436,25 +436,28 @@ endif
+@@ -425,25 +425,28 @@ endif
  
  # MDDEPDIR is the subdirectory where dependency files are stored
  MDDEPDIR := .deps
@@ -150,7 +150,7 @@ diff --git a/config/rules.mk b/config/rules.mk
 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
-@@ -361,25 +361,31 @@ class CommonBackend(BuildBackend):
+@@ -202,25 +202,31 @@ class CommonBackend(BuildBackend):
              }
              json.dump(d, fh, sort_keys=True, indent=4)
  
@@ -182,7 +182,7 @@ diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbui
                      recurse_objs = False
                  elif recurse_objs:
                      add_objs(lib)
-@@ -411,17 +417,17 @@ class CommonBackend(BuildBackend):
+@@ -252,17 +258,17 @@ class CommonBackend(BuildBackend):
                      seen_libs.add(lib)
                      shared_libs.append(lib)
  
@@ -292,7 +292,7 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
 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
-@@ -347,16 +347,18 @@ class LinkageMultipleRustLibrariesError(
+@@ -383,26 +383,30 @@ class LinkageMultipleRustLibrariesError(
  
  class Linkable(ContextDerived):
      """Generic context derived container object for programs and libraries"""
@@ -303,6 +303,7 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
          'linked_system_libs',
 +        'no_pgo_sources',
 +        'no_pgo',
+         'sources',
      )
  
      def __init__(self, context):
@@ -311,3 +312,75 @@ diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuil
          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 - 65
bug1240930-253/frg-mozilla/1430886-59a1.patch

@@ -1,65 +0,0 @@
-# HG changeset patch
-# User Ralph Giles <giles@mozilla.com>
-# Date 1516206771 28800
-# Node ID 261725e65af9b5d98ff593db3db08632bf019454
-# Parent  3f10158e6cc158091c8c89a35bce079c235009ed
-Bug 1430886 - Disable incremental rust in automation. r=froydnj
-
-Work around excessive command-line length issues by
-disabling incremental rust compilation, which is enabled
-by default outside `cargo --release` starting with Rust 1.24.
-
-Incremental rust builds shouldn't help much in automation,
-where sccache provides the only continuity between build
-environments. In the meantime, they add a lot of object
-files to the link line.
-
-See https://github.com/rust-lang/rust/pull/47507 about addressing
-the underlying issue upstream.
-
-MozReview-Commit-ID: LRwUj3fhiaO
-
-diff --git a/config/rules.mk b/config/rules.mk
---- a/config/rules.mk
-+++ b/config/rules.mk
-@@ -861,16 +861,22 @@ cargo_rustc_flags += -Clto
- # Versions of rust >= 1.45 need -Cembed-bitcode=yes for all crates when
- # using -Clto.
- ifeq (,$(filter 1.37.% 1.38.% 1.39.% 1.40.% 1.41.% 1.42.% 1.43.% 1.44.%,$(RUSTC_VERSION)))
- RUSTFLAGS += -Cembed-bitcode=yes
- endif
- endif
- endif
- 
-+# Disable incremental Rust compilation in automation builds, where
-+# the lack of environmental continuity makes it unhelpful.
-+ifdef MOZ_AUTOMATION
-+cargo_incremental := CARGO_INCREMENTAL=0
-+endif
-+
- rustflags_override = RUSTFLAGS='$(MOZ_RUST_DEFAULT_FLAGS) $(RUSTFLAGS)'
- 
- ifdef MOZ_MSVCBITS
- # If we are building a MozillaBuild shell, we want to clear out the
- # vcvars.bat environment variables for cargo builds. This is because
- # a 32-bit MozillaBuild shell on a 64-bit machine will try to use
- # the 32-bit compiler/linker for everything, while cargo/rustc wants
- # to use the 64-bit linker for build.rs scripts. This conflict results
-@@ -897,16 +903,17 @@ define RUN_CARGO
- 	RUSTC=$(RUSTC) \
- 	MOZ_SRC=$(topsrcdir) \
- 	MOZ_DIST=$(ABS_DIST) \
- 	LIBCLANG_PATH="$(MOZ_LIBCLANG_PATH)" \
- 	CLANG_PATH="$(MOZ_CLANG_PATH)" \
- 	PKG_CONFIG_ALLOW_CROSS=1 \
- 	RUST_BACKTRACE=full \
- 	MOZ_TOPOBJDIR=$(topobjdir) \
-+	$(cargo_incremental) \
- 	$(2) \
- 	$(CARGO) $(1) $(cargo_build_flags)
- endef
- 
- # This function is intended to be called by:
- #
- #   $(call CARGO_BUILD,EXTRA_ENV_VAR1=X EXTRA_ENV_VAR2=Y ...)
- #

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

@@ -0,0 +1,1565 @@
+# 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 - 190
bug1240930-253/frg-mozilla/1443204-1only-60a1.patch

@@ -1,190 +0,0 @@
-# HG changeset patch
-# User Nick Alexander <nalexander@mozilla.com>
-# Date 1520376784 28800
-# Node ID c15be736fff0142881ff6129f18728dd96a6f7a7
-# Parent  7f7a997cef62d775588b7c9a0d5405ad6f917d95
-Bug 1443204 - Pre: Clean-up unused Android data structures in mozbuild frontend. r=chmanchester
-
-MozReview-Commit-ID: 5ympxk0jSJq
-
-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
-@@ -24,20 +24,16 @@ from mozbuild.frontend.context import (
-     AbsolutePath,
-     Path,
-     RenamedSourcePath,
-     SourcePath,
-     ObjDirPath,
- )
- from .common import CommonBackend
- from ..frontend.data import (
--    AndroidAssetsDirs,
--    AndroidResDirs,
--    AndroidExtraResDirs,
--    AndroidExtraPackages,
-     BaseLibrary,
-     BaseProgram,
-     ChromeManifestEntry,
-     ComputedFlags,
-     ConfigFileSubstitution,
-     ContextDerived,
-     Defines,
-     DirectoryTraversal,
-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
-@@ -1015,69 +1015,16 @@ class GeneratedFile(ContextDerived):
-             '.inc',
-             '.py',
-             '.rs',
-             'new', # 'new' is an output from make-stl-wrappers.py
-         )
-         self.required_for_compile = any(f.endswith(suffixes) for f in self.outputs)
- 
- 
--class AndroidResDirs(ContextDerived):
--    """Represents Android resource directories."""
--
--    __slots__ = (
--        'paths',
--    )
--
--    def __init__(self, context, paths):
--        ContextDerived.__init__(self, context)
--        self.paths = paths
--
--
--class AndroidAssetsDirs(ContextDerived):
--    """Represents Android assets directories."""
--
--    __slots__ = (
--        'paths',
--    )
--
--    def __init__(self, context, paths):
--        ContextDerived.__init__(self, context)
--        self.paths = paths
--
--
--class AndroidExtraResDirs(ContextDerived):
--    """Represents Android extra resource directories.
--
--    Extra resources are resources provided by libraries and including in a
--    packaged APK, but not otherwise redistributed.  In practice, this means
--    resources included in Fennec but not in GeckoView.
--    """
--
--    __slots__ = (
--        'paths',
--    )
--
--    def __init__(self, context, paths):
--        ContextDerived.__init__(self, context)
--        self.paths = paths
--
--
--class AndroidExtraPackages(ContextDerived):
--    """Represents Android extra packages."""
--
--    __slots__ = (
--        'packages',
--    )
--
--    def __init__(self, context, packages):
--        ContextDerived.__init__(self, context)
--        self.packages = packages
--
--
- class ChromeManifestEntry(ContextDerived):
-     """Represents a chrome.manifest entry."""
- 
-     __slots__ = (
-         'path',
-         'entry',
-     )
- 
-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
-@@ -18,20 +18,16 @@ from mozbuild.util import (
-     OrderedDefaultDict,
- )
- 
- import mozpack.path as mozpath
- import mozinfo
- import pytoml
- 
- from .data import (
--    AndroidAssetsDirs,
--    AndroidExtraPackages,
--    AndroidExtraResDirs,
--    AndroidResDirs,
-     BaseSources,
-     ChromeManifestEntry,
-     ComputedFlags,
-     ConfigFileSubstitution,
-     Defines,
-     DirectoryTraversal,
-     Exports,
-     FinalTargetFiles,
-@@ -1343,28 +1339,29 @@ class TreeMetadataEmitter(LoggingMixin):
-                     if not os.path.exists(script):
-                         raise SandboxValidationError(
-                             'Script for generating %s does not exist: %s'
-                             % (f, script), context)
-                     if os.path.splitext(script)[1] != '.py':
-                         raise SandboxValidationError(
-                             'Script for generating %s does not end in .py: %s'
-                             % (f, script), context)
--
--                    for i in flags.inputs:
--                        p = Path(context, i)
--                        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)
-                 else:
-                     script = None
-                     method = None
-+
-+                for i in flags.inputs:
-+                    p = Path(context, i)
-+                    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)
- 
-     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
-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
-@@ -9,17 +9,16 @@ import unittest
- 
- from mozunit import main
- 
- from mozbuild.frontend.context import (
-     ObjDirPath,
-     Path,
- )
- from mozbuild.frontend.data import (
--    AndroidResDirs,
-     ChromeManifestEntry,
-     ComputedFlags,
-     ConfigFileSubstitution,
-     Defines,
-     DirectoryTraversal,
-     Exports,
-     FinalTargetPreprocessedFiles,
-     GeneratedFile,

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

@@ -0,0 +1,439 @@
+# 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)
+

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

@@ -0,0 +1,160 @@
+# 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:
+

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

@@ -0,0 +1,143 @@
+# 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',

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

@@ -0,0 +1,412 @@
+# 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."""

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

@@ -0,0 +1,44 @@
+# 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:]))
+

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

@@ -0,0 +1,178 @@
+# 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)
+ 

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

@@ -0,0 +1,74 @@
+# 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:]))

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

@@ -0,0 +1,33 @@
+# 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)

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

@@ -0,0 +1,183 @@
+# 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()

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

@@ -0,0 +1,37 @@
+# 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

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

@@ -0,0 +1,29 @@
+# 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.

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

@@ -0,0 +1,94 @@
+# 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

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

@@ -0,0 +1,84 @@
+# 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

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

@@ -0,0 +1,46 @@
+# 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)

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

@@ -0,0 +1,21 @@
+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

+ 0 - 27
bug1240930-253/frg-mozilla/series-pre

@@ -1,27 +0,0 @@
-# After WIP-9999999-nsrefreshdriveroptimize.patch
-
-1388423-57a1.patch
-1373878-1-58a1.patch
-1373878-2no345-58a1.patch
-1414064-1-58a1.patch
-1414064-2-58a1.patch
-1414064-3-58a1.patch
-1414064-4-58a1.patch
-1414064-5-58a1.patch
-1414064-6-58a1.patch
-1360650-1only-59a1.patch
-1430886-59a1.patch
-1443204-1only-60a1.patch
-1255485-1-61a1.patch
-1255485-2-61a1.patch
-1255485-3-61a1.patch
-1255485-4-61a1.patch
-1255485-5-61a1.patch
-1255485-6-61a1.patch
-1429875-1-61a1.patch
-1429875-2-61a1.patch
-1429875-3-61a1.patch
-1429875-4-61a1.patch
-1429875-5-PARTIAL-61a1.patch
-
-# before 1443208-1only-62a1.patch