mozilla-reduce-files-per-UnifiedBindings.patch
changeset 1045 f645c886d36b
parent 1006 5ba9b67de554
equal deleted inserted replaced
1044:142a0c92607c 1045:f645c886d36b
    11 [ 1616s] {standard input}:316015: Warning: end of file not at end of a line; newline inserted
    11 [ 1616s] {standard input}:316015: Warning: end of file not at end of a line; newline inserted
    12 [ 1635s] {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
    12 [ 1635s] {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
    13 [ 1636s] c++: internal compiler error: Killed (program cc1plus)
    13 [ 1636s] c++: internal compiler error: Killed (program cc1plus)
    14 [ 1636s] Please submit a full bug report,
    14 [ 1636s] Please submit a full bug report,
    15 
    15 
    16 diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py
    16 diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py
    17 --- a/python/mozbuild/mozbuild/backend/common.py
    17 --- a/python/mozbuild/mozbuild/frontend/data.py
    18 +++ b/python/mozbuild/mozbuild/backend/common.py
    18 +++ b/python/mozbuild/mozbuild/frontend/data.py
    19 @@ -386,17 +386,17 @@ class CommonBackend(BuildBackend):
    19 @@ -310,17 +310,17 @@ class WebIDLCollection(ContextDerived):
    20          )
    20      @property
    21          self._handle_generated_sources(manager.expected_build_output_files())
    21      def unified_source_mapping(self):
    22          # Bindings are compiled in unified mode to speed up compilation and
    22          # Bindings are compiled in unified mode to speed up compilation and
    23          # to reduce linker memory size. Note that test bindings are separated
    23          # to reduce linker memory size. Note that test bindings are separated
    24          # from regular ones so tests bindings aren't shipped.
    24          # from regular ones so tests bindings aren't shipped.
    25          unified_source_mapping = list(group_unified_files(webidls.all_regular_cpp_basenames(),
    25          return list(group_unified_files(self.all_regular_cpp_basenames(),
    26                                                            unified_prefix='UnifiedBindings',
    26                                          unified_prefix='UnifiedBindings',
    27                                                            unified_suffix='cpp',
    27                                          unified_suffix='cpp',
    28 -                                                          files_per_unified_file=32))
    28 -                                        files_per_unified_file=32))
    29 +                                                          files_per_unified_file=16))
    29 +                                        files_per_unified_file=16))
    30          self._write_unified_files(unified_source_mapping, bindings_dir,
       
    31                                    poison_windows_h=True)
       
    32          self._handle_webidl_build(bindings_dir, unified_source_mapping,
       
    33                                    webidls,
       
    34                                    manager.expected_build_output_files(),
       
    35                                    manager.GLOBAL_DEFINE_FILES)
       
    36  
    30  
    37      def _write_unified_file(self, unified_file, source_filenames,
    31      def all_source_files(self):
       
    32          from mozwebidlcodegen import WebIDLCodegenManager
       
    33          return (sorted(list(WebIDLCodegenManager.GLOBAL_DEFINE_FILES)) +
       
    34                  sorted(set(p for p, _ in self.unified_source_mapping)))
       
    35  
       
    36  
       
    37  class IPDLCollection(ContextDerived):