Currently feature overriding happens while autogen.sh is called. This bug tracks moving it to the configure phase, so that it can be shared more easily with the gyp build.
Created attachment 189251 [details]
For the sake of reviewers, here is a high-level overview of how the new feature overriding system works:
1. The feature profile for releases is defined in SetupWebKitFeatures.m4. This is what you get when you run configure from the tarball.
2. build-webkit writes WebKitFeatureOverrides.txt in the build directory. This is the developer feature profile (modified by any command-line arguments passed to build-webkit) described as a simple list of key value pairs like:
ENABLE_3D_RENDERING=0 ENABLE_ACCELERATED_2D_CANVAS=0 ENABLE_BATTERY_STATUS=0...
3. configure takes the features defined in SetupWebKitFeatures.m4 and command-line arguments and passes that as an argument to generate-feature-defines-files.
4. generate-feature-defines-files overrides its command-line arguments (the defaults from step 3) with the contents of WebKitFeatureOverrides.txt, if it exists. It writes two files:
* WebKitFeatures.h: A header that has all the features as compiler defines. Before these were passed as command-line arguments to the compiler. This header is included in the autotoolconfig.h header. If it changes, it will trigger a full rebuild.
* WebKitFeatures.txt: A key-value pair list of the resolved features that are passed to code generators. This used to be generated by the WebCore GNUmakefile.am.
5. GNUmakefile.am reads WebKitFeatures.txt and passes the contents to all code generators.
Comment on attachment 189251 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=189251&action=review
> + dnl Grep the generated GNUmakefile.features.am
s/GNUmakefile.features.am/WebKitFeatures.txt/, but I'd just remove the comment, the code is pretty self-explanatory.
Committed r143604: <http://trac.webkit.org/changeset/143604>
Martin, can you also update http://trac.webkit.org/wiki/AddingFeatures to reflect this commit ?
This commit uses read -d which is a bashism for the read builtin. Configure bails out with ksh here.
checking for pthread_rwlock_init in -lpthread... yes
./configure: read: -d: unknown option
env: python: No such file or directory
A more sh-portable option is to use a backslash between each value:
read FOO << "EOF"
(In reply to comment #7)
> A more sh-portable option is to use a backslash between each value:
> read FOO << "EOF"
> a \
> b \
Makes sense. Do you mind opening a bug for this and CCing me?