mozilla-reduce-files-per-UnifiedBindings.patch
changeset 1088 84cdfb476431
parent 1074 4b99400f6d17
parent 1087 5fab52cd743d
child 1113 8e9195853a32
equal deleted inserted replaced
1074:4b99400f6d17 1088:84cdfb476431
     1 From: Andreas Stieger <astieger@suse.com>
       
     2 Date: Fri, 26 Feb 2016 16:20:09 +0000
       
     3 Subject: For UnifiedBindings*.cpp files, reduce number of files per unified file
       
     4 Upstream: no
       
     5 
       
     6 home/abuild/rpmbuild/BUILD/obj/dom/bindings/UnifiedBindings16.cpp
       
     7 [ 1589s] UnifiedBindings17.o
       
     8 [ 1612s] [ 1567.621989] Out of memory: Kill process 19849 (cc1plus) score 170 or sacrifice child
       
     9 [ 1612s] [ 1567.625099] Killed process 19849 (cc1plus) total-vm:905704kB, anon-rss:102500kB, file-rss:156kB
       
    10 [ 1616s] {standard input}: Assembler messages:
       
    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
       
    13 [ 1636s] c++: internal compiler error: Killed (program cc1plus)
       
    14 [ 1636s] Please submit a full bug report,
       
    15 
       
    16 diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py
       
    17 --- a/python/mozbuild/mozbuild/frontend/data.py
       
    18 +++ b/python/mozbuild/mozbuild/frontend/data.py
       
    19 @@ -310,17 +310,17 @@ class WebIDLCollection(ContextDerived):
       
    20      @property
       
    21      def unified_source_mapping(self):
       
    22          # Bindings are compiled in unified mode to speed up compilation and
       
    23          # to reduce linker memory size. Note that test bindings are separated
       
    24          # from regular ones so tests bindings aren't shipped.
       
    25          return list(group_unified_files(self.all_regular_cpp_basenames(),
       
    26                                          unified_prefix='UnifiedBindings',
       
    27                                          unified_suffix='cpp',
       
    28 -                                        files_per_unified_file=32))
       
    29 +                                        files_per_unified_file=16))
       
    30  
       
    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):