Changeset 275686 in webkit


Ignore:
Timestamp:
Apr 8, 2021, 4:04:46 PM (4 years ago)
Author:
ddkilzer@apple.com
Message:

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.
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r275682 r275686  
     12021-04-08  David Kilzer  <ddkilzer@apple.com>
     2
     3        REGRESSION (r275150): set-webkit-configuration is too aggressive at deleting config files when coverage/sanitizer switch is not set
     4        <https://webkit.org/b/224343>
     5
     6        Reviewed by Mark Lam.
     7
     8        * Scripts/set-webkit-configuration:
     9        (updateOrDeleteConfigurationFile):
     10        - Change to take enabled and disabled arguments, and only
     11          reset (unlink) a config file if the --no-<option> is
     12          explicitly set.
     13
    1142021-04-08  Kate Cheney  <katherine_cheney@apple.com>
    215
  • trunk/Tools/Scripts/set-webkit-configuration

    r275534 r275686  
    5252sub printCurrentSettings();
    5353sub printUsage();
    54 sub updateOrDeleteConfigurationFile($$);
     54sub updateOrDeleteConfigurationFile($$$);
    5555
    5656my $configuration = passedConfiguration();
     
    130130}
    131131
    132 sub updateOrDeleteConfigurationFile($$)
    133 {
    134     my ($fileName, $contents) = @_;
    135     my $filePath = File::Spec->catfile($baseProductDir, $fileName);
    136     if ($contents) {
    137        open FILE, ">", $filePath or die;
    138        print FILE $contents;
    139        close FILE;
    140     } else {
    141         unlink $filePath;
    142     }
    143 }
    144 
    145132if ($configuration) {
    146133    open CONFIGURATION, ">", "$baseProductDir/Configuration" or die;
     
    159146}
    160147
    161 updateOrDeleteConfigurationFile("ASan", $enableASAN ? "YES" : undef);
    162 updateOrDeleteConfigurationFile("Coverage", $enableCoverage ? "YES" : undef);
    163 updateOrDeleteConfigurationFile("TSan", $enableTSAN ? "YES" : undef);
    164 updateOrDeleteConfigurationFile("UBSan", $enableUBSAN ? "YES" : undef);
     148updateOrDeleteConfigurationFile("ASan", $enableASAN, $disableASAN);
     149updateOrDeleteConfigurationFile("Coverage", $enableCoverage, $disableCoverage);
     150updateOrDeleteConfigurationFile("TSan", $enableTSAN, $disableTSAN);
     151updateOrDeleteConfigurationFile("UBSan", $enableUBSAN, $disableUBSAN);
    165152
    166153if ($forceOptimizationLevel && $forceOptimizationLevel eq "none") {
     
    202189    printCurrentSettings();
    203190}
     191
     192sub updateOrDeleteConfigurationFile($$$)
     193{
     194    my ($fileName, $shouldEnable, $shouldDisable) = @_;
     195    my $filePath = File::Spec->catfile($baseProductDir, $fileName);
     196    if ($shouldEnable) {
     197       open FILE, ">", $filePath or die;
     198       print FILE "YES";
     199       close FILE;
     200    } elsif ($shouldDisable) {
     201        unlink $filePath;
     202    }
     203}
Note: See TracChangeset for help on using the changeset viewer.