Changeset 137519 in webkit


Ignore:
Timestamp:
Dec 12, 2012, 3:01:06 PM (12 years ago)
Author:
tony@chromium.org
Message:

[chromium] don't write additional idl files to a gyp temp file
https://bugs.webkit.org/show_bug.cgi?id=104831

Reviewed by Kentaro Hara.

The <|( command doesn't work for files like <(PRODUCT_DIR) or <(SHARED_INTERMEDIATE_DIR).
For additional_idl_files, pass it as a parameter instead of a file listing the filenames.
There are currently only 3 files in this variable. This shouldn't overflow the command
line since the limit on Windows is 8k and with this change, we're still only around 4.5k.
Also, the longest part of the command line is the list of defines. If needed, we could put
that in a file instead.

No new tests, this is a refactoring of the build files.

  • WebCore.gyp/WebCore.gyp: Don't use <|( for additional_idl_files.
  • bindings/scripts/generate-bindings.pl: Change --additionalIdlFilesList to

--additionalIdlFiles, which is a shell argument containing the filenames.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r137516 r137519  
     12012-12-12  Tony Chang  <tony@chromium.org>
     2
     3        [chromium] don't write additional idl files to a gyp temp file
     4        https://bugs.webkit.org/show_bug.cgi?id=104831
     5
     6        Reviewed by Kentaro Hara.
     7
     8        The <|( command doesn't work for files like <(PRODUCT_DIR) or <(SHARED_INTERMEDIATE_DIR).
     9        For additional_idl_files, pass it as a parameter instead of a file listing the filenames.
     10        There are currently only 3 files in this variable. This shouldn't overflow the command
     11        line since the limit on Windows is 8k and with this change, we're still only around 4.5k.
     12        Also, the longest part of the command line is the list of defines. If needed, we could put
     13        that in a file instead.
     14
     15        No new tests, this is a refactoring of the build files.
     16
     17        * WebCore.gyp/WebCore.gyp: Don't use <|( for additional_idl_files.
     18        * bindings/scripts/generate-bindings.pl: Change --additionalIdlFilesList to
     19        --additionalIdlFiles, which is a shell argument containing the filenames.
     20
    1212012-12-12  Chris Rogers  <crogers@google.com>
    222
  • trunk/Source/WebCore/WebCore.gyp/WebCore.gyp

    r136979 r137519  
    581581        'generate_supplemental_dependency',
    582582      ],
    583       'variables': {
    584         # Write sources into a file, so that the action command line won't
    585         # exceed OS limits.
    586         'additional_idl_files_list': '<|(additional_idl_files_list.tmp <@(webcore_test_support_idl_files))',
    587       },
    588583      'sources': [
    589584        # bison rule
     
    11701165            '../bindings/scripts/preprocessor.pm',
    11711166            '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
    1172             '<(additional_idl_files_list)',
    1173             '<!@(cat <(additional_idl_files_list))',
     1167            '<@(webcore_test_support_idl_files)',
    11741168          ],
    11751169          'outputs': [
     
    12251219            '--supplementalDependencyFile',
    12261220            '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
    1227             '--additionalIdlFilesList',
    1228             '<(additional_idl_files_list)',
     1221            '--additionalIdlFiles',
     1222            '<(webcore_test_support_idl_files)',
    12291223            '<(RULE_INPUT_PATH)',
    12301224            '<@(preprocessor)',
  • trunk/Source/WebCore/bindings/scripts/generate-bindings.pl

    r135229 r137519  
    3434use File::Basename;
    3535use Getopt::Long;
     36use Text::ParseWords;
    3637use Cwd;
    3738
     
    5051my $verbose;
    5152my $supplementalDependencyFile;
    52 my $additionalIdlFilesList;
     53my $additionalIdlFiles;
    5354
    5455GetOptions('include=s@' => \@idlDirectories,
     
    6364           'write-dependencies' => \$writeDependencies,
    6465           'supplementalDependencyFile=s' => \$supplementalDependencyFile,
    65            'additionalIdlFilesList=s' => \$additionalIdlFilesList);
     66           'additionalIdlFiles=s' => \$additionalIdlFiles);
    6667
    6768my $targetIdlFile = $ARGV[0];
     
    103104    close FH;
    104105
    105     # The file $additionalIdlFilesList contains one IDL file per line:
    106     # P.idl
    107     # Q.idl
    108     # ...
    109     # These IDL files are ones which should not be included in DerivedSources*.cpp
    110     # (i.e. they are not described in the supplemental dependency file)
    111     # but should generate .h and .cpp files.
    112     if (!$idlFound and $additionalIdlFilesList) {
    113         open FH, "< $additionalIdlFilesList" or die "Cannot open $additionalIdlFilesList\n";
    114         my @idlFiles = <FH>;
    115         chomp(@idlFiles);
     106    # $additionalIdlFiles is list of IDL files which should not be included in
     107    # DerivedSources*.cpp (i.e. they are not described in the supplemental
     108    # dependency file) but should generate .h and .cpp files.
     109    if (!$idlFound and $additionalIdlFiles) {
     110        my @idlFiles = shellwords($additionalIdlFiles);
    116111        $idlFound = grep { $_ and basename($_) eq basename($targetIdlFile) } @idlFiles;
    117         close FH;
    118112    }
    119113
Note: See TracChangeset for help on using the changeset viewer.