+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
use warnings;
use strict;
+use File::Basename;
+
+sub touch($);
+
my $arch = $ENV{'CURRENT_ARCH'};
my $configuration = $ENV{'CONFIGURATION'};
my $target = $ENV{'TARGET_NAME'};
$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}"};
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";
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";
unlink $executablePath;
exit 1;
}
+
+exit 0;
+
+sub touch($)
+{
+ my ($path) = @_;
+ open(TOUCH, ">", $path) or die "$!";
+ close(TOUCH);
+}