Title: [233386] trunk/Tools
- Revision
- 233386
- Author
- [email protected]
- Date
- 2018-06-29 19:06:23 -0700 (Fri, 29 Jun 2018)
Log Message
Perl uninitialized value $isEnabled when running build-jsc using a CMake build
https://bugs.webkit.org/show_bug.cgi?id=187208
Reviewed by Tim Horton.
Share logic for computing the feature flags to enable in CMake with both script
build-webkit and script build-jsc instead of duplicating it. This also fixes a
bug in the version of this logic in build-jsc that was inadvertently not updated
in r222394. In r222394 we removed the notion of a default value for a feature flag
listed in webkitperl::FeatureList.
We keep the current behavior of build-jsc and leave it up to the build system
to determine whether to enable or disable ENABLE_EXPERIMENTAL_FEATURES.
* Scripts/build-jsc:
(buildMyProject):
(cMakeArgsFromFeatures): Deleted.
* Scripts/build-webkit:
(cMakeArgsFromFeatures): Deleted; moved to webkitdirs.pm.
* Scripts/webkitdirs.pm:
(cmakeArgsFromFeatures): Moved code from script build-webkit so that it can be shared
with build-jsc.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (233385 => 233386)
--- trunk/Tools/ChangeLog 2018-06-30 01:20:02 UTC (rev 233385)
+++ trunk/Tools/ChangeLog 2018-06-30 02:06:23 UTC (rev 233386)
@@ -1,3 +1,28 @@
+2018-06-29 Daniel Bates <[email protected]>
+
+ Perl uninitialized value $isEnabled when running build-jsc using a CMake build
+ https://bugs.webkit.org/show_bug.cgi?id=187208
+
+ Reviewed by Tim Horton.
+
+ Share logic for computing the feature flags to enable in CMake with both script
+ build-webkit and script build-jsc instead of duplicating it. This also fixes a
+ bug in the version of this logic in build-jsc that was inadvertently not updated
+ in r222394. In r222394 we removed the notion of a default value for a feature flag
+ listed in webkitperl::FeatureList.
+
+ We keep the current behavior of build-jsc and leave it up to the build system
+ to determine whether to enable or disable ENABLE_EXPERIMENTAL_FEATURES.
+
+ * Scripts/build-jsc:
+ (buildMyProject):
+ (cMakeArgsFromFeatures): Deleted.
+ * Scripts/build-webkit:
+ (cMakeArgsFromFeatures): Deleted; moved to webkitdirs.pm.
+ * Scripts/webkitdirs.pm:
+ (cmakeArgsFromFeatures): Moved code from script build-webkit so that it can be shared
+ with build-jsc.
+
2018-06-29 Tim Horton <[email protected]>
Add -apple-color-filter and system appearance toggles to MiniBrowser
Modified: trunk/Tools/Scripts/build-jsc (233385 => 233386)
--- trunk/Tools/Scripts/build-jsc 2018-06-30 01:20:02 UTC (rev 233385)
+++ trunk/Tools/Scripts/build-jsc 2018-06-30 02:06:23 UTC (rev 233386)
@@ -37,7 +37,6 @@
use webkitperl::FeatureList qw(getFeatureOptionList);
use POSIX;
-sub cMakeArgsFromFeatures();
sub writeCongrats();
prohibitUnknownPort();
@@ -149,7 +148,7 @@
setBaseProductDir($buildDir);
}
- my @featureArgs = cMakeArgsFromFeatures();
+ my @featureArgs = cmakeArgsFromFeatures(@features);
my $buildTarget = "";
unless (isAnyWindows()) {
@@ -211,22 +210,6 @@
chdirWebKit();
}
-sub cMakeArgsFromFeatures()
-{
- my @args;
- foreach (@features) {
- my $featureName = $_->{define};
- if ($featureName) {
- my $isEnabled = ${$_->{value}};
- if ($isEnabled != $_->{default}) {
- my $featureEnabled = $isEnabled ? "ON" : "OFF";
- push @args, "-D$featureName=$featureEnabled";
- }
- }
- }
- return @args;
-}
-
sub writeCongrats()
{
my $endTime = time();
Modified: trunk/Tools/Scripts/build-webkit (233385 => 233386)
--- trunk/Tools/Scripts/build-webkit 2018-06-30 01:20:02 UTC (rev 233385)
+++ trunk/Tools/Scripts/build-webkit 2018-06-30 02:06:23 UTC (rev 233386)
@@ -45,7 +45,6 @@
use webkitperl::FeatureList qw(getFeatureOptionList);
use POSIX;
-sub cMakeArgsFromFeatures();
sub writeCongrats();
checkRequiredSystemConfig();
@@ -285,7 +284,7 @@
# We remove CMakeCache to avoid the bots reusing cached flags when
# we enable new features. This forces a reconfiguration.
- my @featureArgs = cMakeArgsFromFeatures();
+ my @featureArgs = cmakeArgsFromFeatures(@features, !$noExperimentalFeatures);
removeCMakeCache(@featureArgs);
buildCMakeProjectOrExit($clean, $prefixPath, $makeArgs, (cmakeBasedPortArguments(), @featureArgs), @cmakeArgs);
@@ -293,7 +292,7 @@
my $baseProductDir = baseProductDir();
if (isAppleWinWebKit() || isWinCairo()) {
- my @featureArgs = cMakeArgsFromFeatures();
+ my @featureArgs = cmakeArgsFromFeatures(@features, !$noExperimentalFeatures);
removeCMakeCache(@featureArgs);
chdirWebKit();
@@ -377,28 +376,6 @@
exit 0;
-sub cMakeArgsFromFeatures()
-{
- my @args;
-
- if (!$noExperimentalFeatures) {
- push @args, "-DENABLE_EXPERIMENTAL_FEATURES=ON";
- }
-
- foreach (@features) {
- my $featureName = $_->{define};
- if ($featureName) {
- my $featureValue = ${$_->{value}};
- if (defined $featureValue) {
- my $featureEnabled = $featureValue ? "ON" : "OFF";
- push @args, "-D$featureName=$featureEnabled";
- }
- }
- }
-
- return @args;
-}
-
sub writeCongrats()
{
my $launcherPath = launcherPath();
Modified: trunk/Tools/Scripts/webkitdirs.pm (233385 => 233386)
--- trunk/Tools/Scripts/webkitdirs.pm 2018-06-30 01:20:02 UTC (rev 233385)
+++ trunk/Tools/Scripts/webkitdirs.pm 2018-06-30 02:06:23 UTC (rev 233386)
@@ -65,6 +65,7 @@
&baseProductDir
&chdirWebKit
&checkFrameworks
+ &cmakeArgsFromFeatures
&cmakeBasedPortArguments
¤tSVNRevision
&debugSafari
@@ -2354,6 +2355,26 @@
return 0;
}
+sub cmakeArgsFromFeatures(\@;$)
+{
+ my ($featuresArrayRef, $enableExperimentalFeatures) = @_;
+
+ my @args;
+ push @args, "-DENABLE_EXPERIMENTAL_FEATURES=ON" if $enableExperimentalFeatures;
+ foreach (@$featuresArrayRef) {
+ my $featureName = $_->{define};
+ if ($featureName) {
+ my $featureValue = ${$_->{value}}; # Undef to let the build system use its default.
+ if (defined($featureValue)) {
+ my $featureEnabled = $featureValue ? "ON" : "OFF";
+ push @args, "-D$featureName=$featureEnabled";
+ }
+ }
+ }
+ return @args;
+}
+
+
sub cmakeBasedPortArguments()
{
return ();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes