Changeset 244135 in webkit


Ignore:
Timestamp:
Apr 10, 2019 10:53:21 AM (5 years ago)
Author:
Claudio Saavedra
Message:

Do not generate empty unified sources when unified builds are disabled
https://bugs.webkit.org/show_bug.cgi?id=196767

Reviewed by Konstantin Tokarev.

If unified builds are disabled, the ruby script to generate them
is still used to list the sources that need to be
compiled. Currently, the script always generates bundled unified
sources, even if it's being used just to list all the sources. So
when the unified builds are disabled and no files are going to be
bundled, the script generates one empty file per bundle manager
(that is, one C++ and one ObjectiveC), that gets added to the
sources to be compiled.

  • Scripts/generate-unified-source-bundles.rb: Only go through the

bundle managers file generation when not running in
PrintAllSources mode, to avoid generating empty bundle files.

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r244108 r244135  
     12019-04-10  Claudio Saavedra  <csaavedra@igalia.com>
     2
     3        Do not generate empty unified sources when unified builds are disabled
     4        https://bugs.webkit.org/show_bug.cgi?id=196767
     5
     6        Reviewed by Konstantin Tokarev.
     7
     8        If unified builds are disabled, the ruby script to generate them
     9        is still used to list the sources that need to be
     10        compiled. Currently, the script always generates bundled unified
     11        sources, even if it's being used just to list all the sources. So
     12        when the unified builds are disabled and no files are going to be
     13        bundled, the script generates one empty file per bundle manager
     14        (that is, one C++ and one ObjectiveC), that gets added to the
     15        sources to be compiled.
     16
     17        * Scripts/generate-unified-source-bundles.rb: Only go through the
     18        bundle managers file generation when not running in
     19        PrintAllSources mode, to avoid generating empty bundle files.
     20
    1212019-04-10  Enrique Ocaña González  <eocanha@igalia.com>
    222
  • trunk/Source/WTF/Scripts/generate-unified-source-bundles.rb

    r240994 r244135  
    344344}
    345345
    346 $bundleManagers.each_value {
    347     | manager |
    348     manager.flush
    349 
    350     maxCount = manager.maxCount
    351     next if !maxCount
    352 
    353     manager.flushToMax
    354 
    355     unless manager.extraFiles.empty?
    356         extension = manager.extension
    357         bundleCount = manager.bundleCount
    358         filesToAdd = manager.extraFiles.join(", ")
    359         raise "number of bundles for #{extension} sources, #{bundleCount}, exceeded limit, #{maxCount}. Please add #{filesToAdd} to Xcode then update UnifiedSource#{extension.capitalize}FileCount"
    360     end
    361 }
     346if $mode != :PrintAllSources
     347    $bundleManagers.each_value {
     348        | manager |
     349        manager.flush
     350
     351        maxCount = manager.maxCount
     352        next if !maxCount
     353
     354        manager.flushToMax
     355
     356        unless manager.extraFiles.empty?
     357            extension = manager.extension
     358            bundleCount = manager.bundleCount
     359            filesToAdd = manager.extraFiles.join(", ")
     360            raise "number of bundles for #{extension} sources, #{bundleCount}, exceeded limit, #{maxCount}. Please add #{filesToAdd} to Xcode then update UnifiedSource#{extension.capitalize}FileCount"
     361        end
     362    }
     363end
    362364
    363365if $mode == :GenerateXCFilelists
Note: See TracChangeset for help on using the changeset viewer.