Changeset 55553 in webkit


Ignore:
Timestamp:
Mar 4, 2010 2:15:28 PM (14 years ago)
Author:
Simon Fraser
Message:

2010-03-04 Simon Fraser <Simon Fraser>

Build fix: add exceptions to the check-for-global-initializers script
for FocusController and SpatialNavigation, and improve the script
to actually print out the globals found.

  • Scripts/check-for-global-initializers:
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r55551 r55553  
     12010-03-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Build fix: add exceptions to the check-for-global-initializers script
     4        for FocusController and SpatialNavigation, and improve the script
     5        to actually print out the globals found.
     6
     7        * Scripts/check-for-global-initializers:
     8
    192010-03-04  Dirk Pranke  <dpranke@chromium.org>
    210
  • trunk/WebKitTools/Scripts/check-for-global-initializers

    r54669 r55553  
    3838
    3939sub touch($);
     40sub demangle($);
    4041
    4142my $arch = $ENV{'CURRENT_ARCH'};
     
    7980    }
    8081    my $sawGlobal = 0;
     82    my @globals;
    8183    while (<NM>) {
    8284        if (/^STDOUT:/) {
    83             $sawGlobal = 1 if /__GLOBAL__I/;
     85            my $line = $_;
     86            if ($line =~ /__GLOBAL__I(.+)$/) {
     87                $sawGlobal = 1;
     88                push(@globals, demangle($1));
     89            }
    8490        } else {
    8591            print STDERR if $_ ne "nm: no name list\n";
     
    113119                next if $shortName eq "SVGElementInstance.o";
    114120                next if $shortName eq "XMLHttpRequest.o";
     121
     122                #FIXME: check to see if these are legit.
     123                next if $shortName eq "FocusController.o";
     124                next if $shortName eq "SpatialNavigation.o";
    115125            }
    116126            if ($target eq "WebKit") {
     
    121131
    122132        print "ERROR: $shortName has a global initializer in it! ($file)\n";
     133        print "ERROR: @globals\n";
    123134        $sawError = 1;
    124135    }
     
    139150    close(TOUCH);
    140151}
     152
     153sub demangle($)
     154{
     155    my ($symbol) = @_;
     156    if (!open FILT, "c++filt $symbol |") {
     157        print "ERROR: Could not open c++filt\n";
     158        return;
     159    }
     160    my $result = <FILT>;
     161    close FILT;
     162    chomp $result;
     163    return $result;
     164}
     165
Note: See TracChangeset for help on using the changeset viewer.