[webkit-dev] RFC: Removing feature flag defaults in build-webkit

Konstantin Tokarev annulen at yandex.ru
Thu Sep 21 12:04:10 PDT 2017



21.09.2017, 22:01, "Tim Horton" <timothy_horton at apple.com>:
>>  On Sep 21, 2017, at 11:57, Konstantin Tokarev <annulen at yandex.ru> wrote:
>>
>>  21.09.2017, 21:54, "Tim Horton" <timothy_horton at apple.com>:
>>>  Hi, all!
>>>
>>>  Would anybody mind if build-webkit stopped being a source of default values of feature flags?
>>>
>>>  We have defaults for feature flags in FeatureDefines.xcconfig for Xcode, WebKitFeatures.cmake (and Options*.cmake for platform overrides) for CMake, and FeatureDefines.h for everyone. This is already a mess. But it gets worse!
>>>
>>>  Right now, for both the Xcode and CMake builds, build-webkit overrides those with its own set of defaults (in FeatureList.pm). There is also currently an argument to fall back to the CMake defaults (--default-cmake-features) and ignore build-webkit’s defaults.
>>>
>>>  It doesn’t make sense that build-webkit enables a different set of features than a plain ol’ ‘xcodebuild’ or ‘cmake’ in the root directory. It seems like we’ve mostly tried to keep them in sync, but that’s silly busywork for seemingly little benefit.
>>>
>>>  If we do this, the effective changes would be as follows:
>>>
>>>>  1) The default values of feature flags would be specified in all of the usual places except FeatureList.pm
>>>>  2) build-webkit --help will no longer list the default value of feature flags
>>>>  3) It will be easier (but still not easy, yet) to reason about the default value of feature flags, and keep them in sync between different ways people build
>>>>  4) --default-cmake-features will go away, because it will always be true
>>>
>>>  And things that wouldn’t change:
>>>
>>>>  1) You will still be able to use --FEATURE, --no-FEATURE, and --minimal arguments to build-webkit
>>>
>>>  Any objections or things I’ve overlooked?
>>
>>  I think it would be more useful to have a single file (e.g. JSON) with options and their default values, and generate all other lists from it.
>
> I agree, but it is a much, much bigger project to get us to 1 list than to reduce us by 1 list.

In the past at least Qt port was generating its feature list from FeatureList.pm with a really simple script

https://trac.webkit.org/browser/webkit/trunk/Tools/qmake/dump-features.pl?rev=156692

>
>>>  —Tim
>>>  ,
>>>
>>>  _______________________________________________
>>>  webkit-dev mailing list
>>>  webkit-dev at lists.webkit.org
>>>  https://lists.webkit.org/mailman/listinfo/webkit-dev
>>
>>  --
>>  Regards,
>>  Konstantin

-- 
Regards,
Konstantin


More information about the webkit-dev mailing list