[webkit-dev] FeatureDefines.h and .xcconfig
Dean Jackson
dino at apple.com
Wed Aug 6 14:22:39 PDT 2014
Hi floks,
Things are a bit confusing in the OS X and iOS build configurations because we have both a FeatureDefines.h and a set of .xcconfig files, often defining the same thing, and sometimes inconsistently (or at least I've made the mistake of turning a feature off in one place when the other place turned it back on).
Obviously it would be good to have only one location for feature enabling.
While FeatureDefines.h says "Use this file to list _all_ ENABLE() macros" it also says "The feature defaults in this file are only taken into account if the (port specific) build system has not enabled or disabled a particular feature", which is not true.
My proposal is to stop using FeatureDefines.h for the Apple ports (*) and move completely to .xcconfig files.
Notes:
- Some scripts launched by Xcode might use the ENABLE_WHATEVER environment variables (which FeatureDefines.h can't provide)
- The xcconfig files will probably have to be of the form ENABLE_WHATEVER=0 to disable a feature, rather than just leaving it blank.
- We'd have to change from #ifdef to #if in places.
- You'd always have to edit 4 files to toggle a feature :(
- Generating the FeatureDefines.xcconfig from FeatureDefines.h might be cool, but we have a fair amount of release-specific logic in there (e.g. only enabled on 10.9).
Is this a terrible idea? Please suggest a better one!
Dean
(*) I think Apple's Windows port should probably continue with FeatureDefines.h because it doesn't use Xcode.
More information about the webkit-dev
mailing list