Title: [275305] trunk/Tools
Revision
275305
Author
[email protected]
Date
2021-03-31 13:36:11 -0700 (Wed, 31 Mar 2021)

Log Message

REGRESSION (r275150): set-webkit-configuration is too aggressive at deleting config files when switch is not set
<https://webkit.org/b/224009>

Reviewed by Mark Lam.

* Scripts/set-webkit-configuration:
- Partially revert changes in r275150 when the config file
  wasn't always deleted for $architecture, $configuration,
  $forceOptimizationLevel and $ltoMode.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (275304 => 275305)


--- trunk/Tools/ChangeLog	2021-03-31 20:32:02 UTC (rev 275304)
+++ trunk/Tools/ChangeLog	2021-03-31 20:36:11 UTC (rev 275305)
@@ -1,3 +1,15 @@
+2021-03-31  David Kilzer  <[email protected]>
+
+        REGRESSION (r275150): set-webkit-configuration is too aggressive at deleting config files when switch is not set
+        <https://webkit.org/b/224009>
+
+        Reviewed by Mark Lam.
+
+        * Scripts/set-webkit-configuration:
+        - Partially revert changes in r275150 when the config file
+          wasn't always deleted for $architecture, $configuration,
+          $forceOptimizationLevel and $ltoMode.
+
 2021-03-31  Alex Christensen  <[email protected]>
 
         Add deprecation macros.

Modified: trunk/Tools/Scripts/set-webkit-configuration (275304 => 275305)


--- trunk/Tools/Scripts/set-webkit-configuration	2021-03-31 20:32:02 UTC (rev 275304)
+++ trunk/Tools/Scripts/set-webkit-configuration	2021-03-31 20:36:11 UTC (rev 275305)
@@ -137,11 +137,37 @@
     }
 }
 
-updateOrDeleteConfigurationFile("Configuration", $configuration);
-updateOrDeleteConfigurationFile("Architecture", $architecture && $architecture ne "x86_64" ? $architecture : undef);
+if ($configuration) {
+    open CONFIGURATION, ">", "$baseProductDir/Configuration" or die;
+    print CONFIGURATION $configuration;
+    close CONFIGURATION;
+}
+
+if ($architecture) {
+    if ($architecture ne "x86_64") {
+        open ARCHITECTURE, ">", "$baseProductDir/Architecture" or die;
+        print ARCHITECTURE $architecture;
+        close ARCHITECTURE;
+    } else {
+        unlink "$baseProductDir/Architecture";
+    }
+}
+
 updateOrDeleteConfigurationFile("ASan", $enableASAN ? "YES" : undef);
 updateOrDeleteConfigurationFile("Coverage", $enableCoverage ? "YES" : undef);
 updateOrDeleteConfigurationFile("TSan", $enableTSAN ? "YES" : undef);
 updateOrDeleteConfigurationFile("UBSan", $enableUBSAN ? "YES" : undef);
-updateOrDeleteConfigurationFile("ForceOptimizationLevel", (!$forceOptimizationLevel || $forceOptimizationLevel eq "none") ? undef : substr($forceOptimizationLevel, 1) . "\n");
-updateOrDeleteConfigurationFile("LTO", $ltoMode);
+
+if ($forceOptimizationLevel && $forceOptimizationLevel eq "none") {
+    unlink "$baseProductDir/ForceOptimizationLevel";
+} elsif ($forceOptimizationLevel) {
+    open ForceOptimizationLevel, ">", "$baseProductDir/ForceOptimizationLevel" or die;
+    print ForceOptimizationLevel substr($forceOptimizationLevel, 1) . "\n";
+    close ForceOptimizationLevel;
+}
+
+if ($ltoMode) {
+    open LTO, ">", "$baseProductDir/LTO" or die;
+    print LTO "$ltoMode";
+    close LTO;
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to