@@ -52,6 +52,7 @@ chdirWebKit();
52
52
53
53
my $showHelp = 0;
54
54
my $clean = 0;
55
+ my $defaultCMakeFeatures = 0;
55
56
my $minimal = 0;
56
57
my $installHeaders ;
57
58
my $installLibs ;
@@ -61,7 +62,6 @@ my @cmakeArgs;
61
62
my $onlyWebKitProject = 0;
62
63
my $coverageSupport = 0;
63
64
my $shouldRunStaticAnalyzer = 0;
64
- my $noExperimentalFeatures = 0;
65
65
my $startTime = time ();
66
66
my $archs32bit = 0;
67
67
@@ -79,10 +79,9 @@ foreach (@ARGV) {
79
79
}
80
80
}
81
81
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
84
83
foreach (@features ) {
85
- ${$_ -> {value }} = ($minimal ? 0 : undef );
84
+ ${$_ -> {value }} = ($minimal ? 0 : $_ -> { default } );
86
85
}
87
86
88
87
my $programName = basename($0 );
@@ -107,12 +106,12 @@ Usage: $programName [options] [options to pass to build system]
107
106
108
107
--inspector-frontend Copy Web Inspector user interface resources to the build directory
109
108
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)
111
110
--makeargs=<arguments> Optional Makefile flags
112
111
--cmakeargs=<arguments> One or more optional CMake flags (e.g. --cmakeargs="-DFOO=bar -DCMAKE_PREFIX_PATH=/usr/local")
113
112
114
113
--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 )
116
115
117
116
--only-webkit Build only the WebKit project
118
117
@@ -130,13 +129,13 @@ my %options = (
130
129
' only-webkit' => \$onlyWebKitProject ,
131
130
' coverage' => \$coverageSupport ,
132
131
' analyze' => \$shouldRunStaticAnalyzer ,
133
- ' no-experimental -features' => \$noExperimentalFeatures ,
132
+ ' default-cmake -features' => \$defaultCMakeFeatures ,
134
133
);
135
134
136
135
# Build usage text and options list from features
137
136
foreach (@features ) {
138
137
my $opt = sprintf (" %-35s" , " --[no-]$_ ->{option}" );
139
- $usage .= " $opt $_ ->{desc}\n " ;
138
+ $usage .= " $opt $_ ->{desc} (default: $_ ->{default}) \n " ;
140
139
$options {" $_ ->{option}!" } = $_ -> {value };
141
140
}
142
141
@@ -177,15 +176,15 @@ my @options = ();
177
176
178
177
if (isAppleCocoaWebKit()) {
179
178
push @options , XcodeOptions();
180
- sub option ($$)
179
+ sub option ($$$ )
181
180
{
182
- my ($feature , $isEnabled ) = @_ ;
183
- return " " if not defined $isEnabled ;
181
+ my ($feature , $isEnabled , $defaultValue ) = @_ ;
182
+ return " " if $defaultValue == $isEnabled ;
184
183
return $feature . " =" . ($isEnabled ? $feature : " " );
185
184
}
186
185
187
186
foreach (@features ) {
188
- my $option = option($_ -> {define }, ${$_ -> {value }});
187
+ my $option = option($_ -> {define }, ${$_ -> {value }}, $_ -> { default } );
189
188
push @options , $option unless $option eq " " ;
190
189
}
191
190
@@ -250,7 +249,7 @@ if (isCMakeBuild() && !isAnyWindows()) {
250
249
my $maxCPULoad = maxCPULoad() if $makeArgs !~ / -l\s *\d +\. ?\d */ ;
251
250
$makeArgs .= " -l" . maxCPULoad() if defined $maxCPULoad ;
252
251
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
254
253
# we enable new features. This forces a reconfiguration.
255
254
my @featureArgs = cMakeArgsFromFeatures();
256
255
removeCMakeCache(@featureArgs );
@@ -347,22 +346,15 @@ exit 0;
347
346
sub cMakeArgsFromFeatures ()
348
347
{
349
348
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" ;
361
354
push @args , " -D$featureName =$featureEnabled " ;
362
355
}
363
356
}
364
357
}
365
-
366
358
return @args ;
367
359
}
368
360
0 commit comments