Skip to content

Commit 53198d6

Browse files
Unreviewed, rolling out r222394.
This broke the Windows Debug Build. Reverted changeset: "Remove build-webkit's notion of feature flags having a default value" https://bugs.webkit.org/show_bug.cgi?id=177338 http://trac.webkit.org/changeset/222394 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@222400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent c322a21 commit 53198d6

File tree

12 files changed

+155
-130
lines changed

12 files changed

+155
-130
lines changed

ChangeLog

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2017-09-22 Matt Lewis <[email protected]>
2+
3+
Unreviewed, rolling out r222394.
4+
5+
This broke the Windows Debug Build.
6+
7+
Reverted changeset:
8+
9+
"Remove build-webkit's notion of feature flags having a
10+
default value"
11+
https://bugs.webkit.org/show_bug.cgi?id=177338
12+
http://trac.webkit.org/changeset/222394
13+
114
2017-09-22 Tim Horton <[email protected]> and Michael Catanzaro <[email protected]>
215

316
Remove build-webkit's notion of feature flags having a default value

Source/WebKit/ChangeLog

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2017-09-22 Matt Lewis <[email protected]>
2+
3+
Unreviewed, rolling out r222394.
4+
5+
This broke the Windows Debug Build.
6+
7+
Reverted changeset:
8+
9+
"Remove build-webkit's notion of feature flags having a
10+
default value"
11+
https://bugs.webkit.org/show_bug.cgi?id=177338
12+
http://trac.webkit.org/changeset/222394
13+
114
2017-09-22 John Wilander <[email protected]>
215

316
Non-prevalent resources should be allowed access to existing cookies in a third-party context

Source/WebKit/Shared/WebPreferencesDefinitions.h

+8-10
Original file line numberDiff line numberDiff line change
@@ -348,25 +348,23 @@
348348
#define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
349349
macro(VisibleDebugOverlayRegions, visibleDebugOverlayRegions, UInt32, uint32_t, 0, "", "")
350350

351+
// Our Xcode build system does not currently have any concept of DEVELOPER_MODE.
351352
// Cocoa ports must disable experimental features on release branches for now.
352-
#if ENABLE(EXPERIMENTAL_FEATURES) || PLATFORM(COCOA)
353+
#if ENABLE(DEVELOPER_MODE) || PLATFORM(COCOA)
353354
#define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED true
354355
#else
355356
#define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED false
356357
#endif
357358

358359
// For experimental features:
359360
// - The type should be boolean.
360-
// - You must provide the last two parameters for all experimental features.
361-
// They are the text exposed to the user from the WebKit client.
362-
// - They should be *alphabetically ordered* by the human readable text (the
363-
// first string).
364-
// - The default value may be either false (for really unstable features) or
361+
// - You must provide the last two parameters for all experimental features. They
362+
// are the text exposed to the user from the WebKit client.
363+
// - They should be alphabetically ordered by the human readable text (the first string).
364+
// - The default value may be either false (for unstable features) or
365365
// DEFAULT_EXPERIMENTAL_FEATURES_ENABLED (for features that are ready for
366-
// wider testing). *The default value may not be true*. That would no longer
367-
// be experimental.
368-
//
369-
// Actually read the comment above before modifying this list!
366+
// wider testing).
367+
370368
#define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
371369
macro(ConstantPropertiesEnabled, constantPropertiesEnabled, Bool, bool, true, "Constant Properties", "Enable CSS constant() properties") \
372370
macro(DisplayContentsEnabled, displayContentsEnabled, Bool, bool, false, "CSS display: contents", "Enable CSS display: contents support") \

Source/cmake/OptionsGTK.cmake

-3
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE PRIVATE ON)
157157
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE_IN_WORKERS PRIVATE ON)
158158
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR PRIVATE ON)
159159
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_SCRIPT PRIVATE ON)
160-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SOURCE PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
161-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
162160
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
163161
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NOTIFICATIONS PRIVATE ON)
164162
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PUBLIC_SUFFIX_LIST PRIVATE ON)
@@ -168,7 +166,6 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USERSELECT_ALL PRIVATE ON)
168166
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USER_MESSAGE_HANDLERS PRIVATE ON)
169167
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SUBTLE_CRYPTO PRIVATE ON)
170168
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PRIVATE ON)
171-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
172169

173170
include(GStreamerDefinitions)
174171

Source/cmake/OptionsWPE.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include(GStreamerDefinitions)
1414
WEBKIT_OPTION_DEFINE(EXPORT_DEPRECATED_WEBKIT2_C_API "Whether to export the WebKit2 C API" PRIVATE OFF)
1515

1616
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_3D_TRANSFORMS PUBLIC ON)
17-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS PUBLIC ${ENABLE_EXPERIMENTAL_FEATURES})
17+
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS PUBLIC OFF)
1818
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_REGIONS PUBLIC OFF)
1919
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_SELECTORS_LEVEL4 PUBLIC ON)
2020
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DEVICE_ORIENTATION PUBLIC OFF)
@@ -24,7 +24,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PUBLIC OFF)
2424
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE PRIVATE ON)
2525
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE_IN_WORKERS PRIVATE OFF)
2626
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_SCRIPT PUBLIC ON)
27-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SOURCE PUBLIC ${ENABLE_EXPERIMENTAL_FEATURES})
27+
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SOURCE PUBLIC OFF)
2828
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
2929
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)
3030
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PUBLIC_SUFFIX_LIST PRIVATE ON)

Source/cmake/WebKitFeatures.cmake

-3
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,3 @@ macro(CREATE_CONFIGURATION_HEADER)
343343
)
344344
file(REMOVE "${CMAKE_BINARY_DIR}/cmakeconfig.h.tmp")
345345
endmacro()
346-
347-
option(ENABLE_EXPERIMENTAL_FEATURES "Enable experimental features" OFF)
348-
SET_AND_EXPOSE_TO_BUILD(ENABLE_EXPERIMENTAL_FEATURES ${ENABLE_EXPERIMENTAL_FEATURES})

Tools/BuildSlaveSupport/build.webkit.org-config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,13 @@
307307
{
308308
"name": "GTK Linux 64-bit Release Debian Stable (Build)", "type": "Build", "builddir": "gtk-linux-64-release-debian",
309309
"platform": "gtk", "configuration": "release", "architectures": ["x86_64"],
310-
"additionalArguments": ["--no-experimental-features"],
310+
"additionalArguments": ["--default-cmake-features"],
311311
"slavenames": ["gtk-linux-slave-10"]
312312
},
313313
{
314314
"name": "GTK Linux 64-bit Release Ubuntu LTS (Build)", "type": "Build", "builddir": "gtk-linux-64-release-ubuntu",
315315
"platform": "gtk", "configuration": "release", "architectures": ["x86_64"],
316-
"additionalArguments": ["--no-experimental-features"],
316+
"additionalArguments": ["--default-cmake-features"],
317317
"slavenames": ["gtk-linux-slave-11"]
318318
},
319319
{

Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ class Factory(factory.BuildFactory):
871871
self.addStep(DeleteStaleBuildFiles())
872872
if platform == "win":
873873
self.addStep(InstallWin32Dependencies())
874-
if platform == "gtk" and additionalArguments != ["--no-experimental-features"]:
874+
if platform == "gtk" and additionalArguments != ["--default-cmake-features"]:
875875
self.addStep(InstallGtkDependencies())
876876
if platform == "wpe":
877877
self.addStep(InstallWpeDependencies())

Tools/ChangeLog

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2017-09-22 Matt Lewis <[email protected]>
2+
3+
Unreviewed, rolling out r222394.
4+
5+
This broke the Windows Debug Build.
6+
7+
Reverted changeset:
8+
9+
"Remove build-webkit's notion of feature flags having a
10+
default value"
11+
https://bugs.webkit.org/show_bug.cgi?id=177338
12+
http://trac.webkit.org/changeset/222394
13+
114
2017-09-22 Tim Horton <[email protected]> and Michael Catanzaro <[email protected]>
215

316
Remove build-webkit's notion of feature flags having a default value

Tools/Scripts/build-webkit

+17-25
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ chdirWebKit();
5252

5353
my $showHelp = 0;
5454
my $clean = 0;
55+
my $defaultCMakeFeatures = 0;
5556
my $minimal = 0;
5657
my $installHeaders;
5758
my $installLibs;
@@ -61,7 +62,6 @@ my @cmakeArgs;
6162
my $onlyWebKitProject = 0;
6263
my $coverageSupport = 0;
6364
my $shouldRunStaticAnalyzer = 0;
64-
my $noExperimentalFeatures = 0;
6565
my $startTime = time();
6666
my $archs32bit = 0;
6767

@@ -79,10 +79,9 @@ foreach (@ARGV) {
7979
}
8080
}
8181

82-
# Feature flags default to undefined, where they will inherit the default value
83-
# specified by the build system, or to 'off' if --minimal is specified.
82+
# Initialize values from defaults
8483
foreach (@features) {
85-
${$_->{value}} = ($minimal ? 0 : undef);
84+
${$_->{value}} = ($minimal ? 0 : $_->{default});
8685
}
8786

8887
my $programName = basename($0);
@@ -107,12 +106,12 @@ Usage: $programName [options] [options to pass to build system]
107106
108107
--inspector-frontend Copy Web Inspector user interface resources to the build directory
109108
110-
--prefix=<path> Set installation prefix to the given path (CMake only, except Windows)
109+
--prefix=<path> Set installation prefix to the given path (Gtk/Efl only)
111110
--makeargs=<arguments> Optional Makefile flags
112111
--cmakeargs=<arguments> One or more optional CMake flags (e.g. --cmakeargs="-DFOO=bar -DCMAKE_PREFIX_PATH=/usr/local")
113112
114113
--minimal No optional features, unless explicitly enabled
115-
--no-experimental-features No experimental features, unless explicitly enabled (CMake only)
114+
--default-cmake-features Use the default CMake features enabled for the port (CMake based ports)
116115
117116
--only-webkit Build only the WebKit project
118117
@@ -130,13 +129,13 @@ my %options = (
130129
'only-webkit' => \$onlyWebKitProject,
131130
'coverage' => \$coverageSupport,
132131
'analyze' => \$shouldRunStaticAnalyzer,
133-
'no-experimental-features' => \$noExperimentalFeatures,
132+
'default-cmake-features' => \$defaultCMakeFeatures,
134133
);
135134

136135
# Build usage text and options list from features
137136
foreach (@features) {
138137
my $opt = sprintf("%-35s", " --[no-]$_->{option}");
139-
$usage .= "$opt $_->{desc}\n";
138+
$usage .= "$opt $_->{desc} (default: $_->{default})\n";
140139
$options{"$_->{option}!"} = $_->{value};
141140
}
142141

@@ -177,15 +176,15 @@ my @options = ();
177176

178177
if (isAppleCocoaWebKit()) {
179178
push @options, XcodeOptions();
180-
sub option($$)
179+
sub option($$$)
181180
{
182-
my ($feature, $isEnabled) = @_;
183-
return "" if not defined $isEnabled;
181+
my ($feature, $isEnabled, $defaultValue) = @_;
182+
return "" if $defaultValue == $isEnabled;
184183
return $feature . "=" . ($isEnabled ? $feature : "");
185184
}
186185

187186
foreach (@features) {
188-
my $option = option($_->{define}, ${$_->{value}});
187+
my $option = option($_->{define}, ${$_->{value}}, $_->{default});
189188
push @options, $option unless $option eq "";
190189
}
191190

@@ -250,7 +249,7 @@ if (isCMakeBuild() && !isAnyWindows()) {
250249
my $maxCPULoad = maxCPULoad() if $makeArgs !~ /-l\s*\d+\.?\d*/;
251250
$makeArgs .= " -l" . maxCPULoad() if defined $maxCPULoad;
252251

253-
# We remove CMakeCache to avoid the bots reusing cached flags when
252+
# We remove CMakeCache to avoid the bots to reuse cached flags when
254253
# we enable new features. This forces a reconfiguration.
255254
my @featureArgs = cMakeArgsFromFeatures();
256255
removeCMakeCache(@featureArgs);
@@ -347,22 +346,15 @@ exit 0;
347346
sub cMakeArgsFromFeatures()
348347
{
349348
my @args;
350-
351-
if (!$noExperimentalFeatures) {
352-
push @args, "-DENABLE_EXPERIMENTAL_FEATURES=ON";
353-
}
354-
355-
foreach (@features) {
356-
my $featureName = $_->{define};
357-
if ($featureName) {
358-
my $featureValue = ${$_->{value}};
359-
if (defined $featureValue) {
360-
my $featureEnabled = $featureValue ? "ON" : "OFF";
349+
if (!$defaultCMakeFeatures) {
350+
foreach (@features) {
351+
my $featureName = $_->{define};
352+
if ($featureName) {
353+
my $featureEnabled = ${$_->{value}} ? "ON" : "OFF";
361354
push @args, "-D$featureName=$featureEnabled";
362355
}
363356
}
364357
}
365-
366358
return @args;
367359
}
368360

Tools/Scripts/webkitdirs.pm

+2
Original file line numberDiff line numberDiff line change
@@ -2072,6 +2072,8 @@ sub generateBuildSystemFromCMakeProject
20722072
# Some ports have production mode, but build-webkit should always use developer mode.
20732073
push @args, "-DDEVELOPER_MODE=ON" if isGtk() || isJSCOnly() || isWPE();
20742074

2075+
# Don't warn variables which aren't used by cmake ports.
2076+
push @args, "--no-warn-unused-cli";
20752077
push @args, @cmakeArgs if @cmakeArgs;
20762078

20772079
my $cmakeSourceDir = isCygwin() ? windowsSourceDir() : sourceDir();

0 commit comments

Comments
 (0)