Modified: trunk/Tools/ChangeLog (275685 => 275686)
--- trunk/Tools/ChangeLog 2021-04-08 22:54:20 UTC (rev 275685)
+++ trunk/Tools/ChangeLog 2021-04-08 23:04:46 UTC (rev 275686)
@@ -1,3 +1,16 @@
+2021-04-08 David Kilzer <ddkil...@apple.com>
+
+ REGRESSION (r275150): set-webkit-configuration is too aggressive at deleting config files when coverage/sanitizer switch is not set
+ <https://webkit.org/b/224343>
+
+ Reviewed by Mark Lam.
+
+ * Scripts/set-webkit-configuration:
+ (updateOrDeleteConfigurationFile):
+ - Change to take enabled and disabled arguments, and only
+ reset (unlink) a config file if the --no-<option> is
+ explicitly set.
+
2021-04-08 Kate Cheney <katherine_che...@apple.com>
Add test infrastructure for app bound request context string
Modified: trunk/Tools/Scripts/set-webkit-configuration (275685 => 275686)
--- trunk/Tools/Scripts/set-webkit-configuration 2021-04-08 22:54:20 UTC (rev 275685)
+++ trunk/Tools/Scripts/set-webkit-configuration 2021-04-08 23:04:46 UTC (rev 275686)
@@ -51,7 +51,7 @@
sub printCurrentSettings();
sub printUsage();
-sub updateOrDeleteConfigurationFile($$);
+sub updateOrDeleteConfigurationFile($$$);
my $configuration = passedConfiguration();
my $architecture = passedArchitecture();
@@ -129,19 +129,6 @@
exit 1;
}
-sub updateOrDeleteConfigurationFile($$)
-{
- my ($fileName, $contents) = @_;
- my $filePath = File::Spec->catfile($baseProductDir, $fileName);
- if ($contents) {
- open FILE, ">", $filePath or die;
- print FILE $contents;
- close FILE;
- } else {
- unlink $filePath;
- }
-}
-
if ($configuration) {
open CONFIGURATION, ">", "$baseProductDir/Configuration" or die;
print CONFIGURATION $configuration;
@@ -158,10 +145,10 @@
}
}
-updateOrDeleteConfigurationFile("ASan", $enableASAN ? "YES" : undef);
-updateOrDeleteConfigurationFile("Coverage", $enableCoverage ? "YES" : undef);
-updateOrDeleteConfigurationFile("TSan", $enableTSAN ? "YES" : undef);
-updateOrDeleteConfigurationFile("UBSan", $enableUBSAN ? "YES" : undef);
+updateOrDeleteConfigurationFile("ASan", $enableASAN, $disableASAN);
+updateOrDeleteConfigurationFile("Coverage", $enableCoverage, $disableCoverage);
+updateOrDeleteConfigurationFile("TSan", $enableTSAN, $disableTSAN);
+updateOrDeleteConfigurationFile("UBSan", $enableUBSAN, $disableUBSAN);
if ($forceOptimizationLevel && $forceOptimizationLevel eq "none") {
unlink "$baseProductDir/ForceOptimizationLevel";
@@ -201,3 +188,16 @@
print STDERR $usage, "\n";
printCurrentSettings();
}
+
+sub updateOrDeleteConfigurationFile($$$)
+{
+ my ($fileName, $shouldEnable, $shouldDisable) = @_;
+ my $filePath = File::Spec->catfile($baseProductDir, $fileName);
+ if ($shouldEnable) {
+ open FILE, ">", $filePath or die;
+ print FILE "YES";
+ close FILE;
+ } elsif ($shouldDisable) {
+ unlink $filePath;
+ }
+}