Commit 22846f7a authored by ddkilzer@apple.com's avatar ddkilzer@apple.com
Browse files

<rdar://problem/5695344> check-for-global-initializers script never checks any object files

        Reviewed by Darin.

        We now touch a check-for-global-initializers.timestamp file in
        the TARGET_TEMP_DIR directory to determine when new object files
        have been compiled and thus need to be checked.  If the timestamp
        file doesn't exist, all object files will be checked.

        Previously the modification time of the "executable" (the
        framework binary, e.g., WebKit.framework/WebKit) was used, but
        since this was the last file modified at the end of the compile
        phase, no object files would ever get checked!

        Also added JSCustomSQLTransactionCallback.o to the list of files
        since it has static initializers in Debug builds of WebCore.

        * Scripts/check-for-global-initializers:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 93dd3e6f
2008-01-19 David Kilzer <ddkilzer@apple.com>
<rdar://problem/5695344> check-for-global-initializers script never checks any object files
Reviewed by Darin.
We now touch a check-for-global-initializers.timestamp file in
the TARGET_TEMP_DIR directory to determine when new object files
have been compiled and thus need to be checked. If the timestamp
file doesn't exist, all object files will be checked.
Previously the modification time of the "executable" (the
framework binary, e.g., WebKit.framework/WebKit) was used, but
since this was the last file modified at the end of the compile
phase, no object files would ever get checked!
Also added JSCustomSQLTransactionCallback.o to the list of files
since it has static initializers in Debug builds of WebCore.
* Scripts/check-for-global-initializers:
2008-01-18 Adam Roben <aroben@apple.com>
 
Build fix
......
#!/usr/bin/perl
# Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
# Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
......@@ -34,6 +34,10 @@
use warnings;
use strict;
use File::Basename;
sub touch($);
my $arch = $ENV{'CURRENT_ARCH'};
my $configuration = $ENV{'CONFIGURATION'};
my $target = $ENV{'TARGET_NAME'};
......@@ -45,7 +49,11 @@ $arch = $ENV{'NATIVE_ARCH'} if !$arch; # for Xcode 2.1, which does not have CURR
$variant = "normal" if !$variant; # for Xcode 2.1, which does not have CURRENT_VARIANT
my $executablePath = "$ENV{'TARGET_BUILD_DIR'}/$ENV{'EXECUTABLE_PATH'}";
my $executableAge = -M $executablePath;
my $buildTimestampPath = $ENV{'TARGET_TEMP_DIR'} . "/" . basename($0) . ".timestamp";
my $buildTimestampAge = -M $buildTimestampPath;
touch($buildTimestampPath);
my $list = $ENV{"LINK_FILE_LIST_${variant}_${arch}"};
......@@ -61,9 +69,9 @@ close LIST;
my $sawError = 0;
for my $file (sort @files) {
if (defined $executableAge) {
if (defined $buildTimestampAge) {
my $fileAge = -M $file;
next if defined $fileAge && $fileAge > $executableAge;
next if defined $fileAge && $fileAge > $buildTimestampAge;
}
if (!open NM, "(nm '$file' | sed 's/^/STDOUT:/') 2>&1 |") {
print "Could not open $file\n";
......@@ -92,6 +100,7 @@ for my $file (sort @files) {
if ($target eq "WebCore") {
next if $shortName eq "CachedPage.o";
next if $shortName eq "Frame.o";
next if $shortName eq "JSCustomSQLTransactionCallback.o";
next if $shortName eq "Node.o";
next if $shortName eq "Page.o";
next if $shortName eq "Range.o";
......@@ -111,3 +120,12 @@ if ($sawError and !$coverageBuild) {
unlink $executablePath;
exit 1;
}
exit 0;
sub touch($)
{
my ($path) = @_;
open(TOUCH, ">", $path) or die "$!";
close(TOUCH);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment