mozilla-reduce-files-per-UnifiedBindings.patch
changeset 1045 f645c886d36b
parent 1006 5ba9b67de554
--- a/mozilla-reduce-files-per-UnifiedBindings.patch	Sun Apr 01 23:51:44 2018 +0200
+++ b/mozilla-reduce-files-per-UnifiedBindings.patch	Mon Apr 02 11:26:04 2018 +0200
@@ -13,25 +13,25 @@
 [ 1636s] c++: internal compiler error: Killed (program cc1plus)
 [ 1636s] Please submit a full bug report,
 
-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
-@@ -386,17 +386,17 @@ class CommonBackend(BuildBackend):
-         )
-         self._handle_generated_sources(manager.expected_build_output_files())
+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
+@@ -310,17 +310,17 @@ class WebIDLCollection(ContextDerived):
+     @property
+     def unified_source_mapping(self):
          # Bindings are compiled in unified mode to speed up compilation and
          # to reduce linker memory size. Note that test bindings are separated
          # from regular ones so tests bindings aren't shipped.
-         unified_source_mapping = list(group_unified_files(webidls.all_regular_cpp_basenames(),
-                                                           unified_prefix='UnifiedBindings',
-                                                           unified_suffix='cpp',
--                                                          files_per_unified_file=32))
-+                                                          files_per_unified_file=16))
-         self._write_unified_files(unified_source_mapping, bindings_dir,
-                                   poison_windows_h=True)
-         self._handle_webidl_build(bindings_dir, unified_source_mapping,
-                                   webidls,
-                                   manager.expected_build_output_files(),
-                                   manager.GLOBAL_DEFINE_FILES)
+         return list(group_unified_files(self.all_regular_cpp_basenames(),
+                                         unified_prefix='UnifiedBindings',
+                                         unified_suffix='cpp',
+-                                        files_per_unified_file=32))
++                                        files_per_unified_file=16))
  
-     def _write_unified_file(self, unified_file, source_filenames,
+     def all_source_files(self):
+         from mozwebidlcodegen import WebIDLCodegenManager
+         return (sorted(list(WebIDLCodegenManager.GLOBAL_DEFINE_FILES)) +
+                 sorted(set(p for p, _ in self.unified_source_mapping)))
+ 
+ 
+ class IPDLCollection(ContextDerived):