[webkit-dev] Features defines: Platform.h vs build system

2011-10-03 Thread Balazs Kelemen

Hi all!

I think we lack a consistent way for setting up the set of feature 
defines. Some of them are handled via Platform.h and some of them via 
the build systems. Don't you think all should be handled the same way? 
This has came up in my mind in connection with the newly introduced 
CSS_FILTERS define. (https://bugs.webkit.org/show_bug.cgi?id=68652) The 
logic to set the define has only been added to the Mac build system 
because the feature is Mac-only currently. I don't think it is a good 
solution. As more platforms would use the feature they also need to add 
the logic to their build system that is somewhat more difficult than 
just adding one more ifdef branch to Platform.h. Note that it is not 
totally avoidable to have some overhead per platform because we need to 
handle the --css-filters build-webkit switch. However build-webkit 
already knows how to set up a -D flag on each platform so it's not a big 
deal.

I wonder about your opinion on this.

-kbalazs
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Features defines: Platform.h vs build system

2011-10-03 Thread Darin Adler
On Oct 3, 2011, at 6:35 AM, Balazs Kelemen wrote:

 I think we lack a consistent way for setting up the set of feature defines. 
 Some of them are handled via Platform.h and some of them via the build 
 systems. Don't you think all should be handled the same way? This has came up 
 in my mind in connection with the newly introduced CSS_FILTERS define. 
 (https://bugs.webkit.org/show_bug.cgi?id=68652) The logic to set the define 
 has only been added to the Mac build system because the feature is Mac-only 
 currently. I don't think it is a good solution. As more platforms would use 
 the feature they also need to add the logic to their build system that is 
 somewhat more difficult than just adding one more ifdef branch to Platform.h. 
 Note that it is not totally avoidable to have some overhead per platform 
 because we need to handle the --css-filters build-webkit switch. However 
 build-webkit already knows how to set up a -D flag on each platform so it's 
 not a big deal.

On the Mac platform, at least, we can build without using the build-webkit 
script. I would not want to make the build-webkit script required more than it 
is today.

I believe the base values of feature defines should be controlled by a 
checked-in source file. Overrides in build scripts would be possible for the 
unusual situation where someone wants to build with an non-standard set of 
feature defines for a given platform.

We have never implemented a separate source file that sets each platform’s base 
values for feature defines. But a while back, Maciej outlined a concept for 
where to put these platform base include files; I don’t remember when that was 
or what the details were.

I think that having the defines for all platforms right there in Platform.h or 
in config.h is absolutely not what we want. Instead we want each high level 
platform’s base defines to be in a file that is just full of #define statements 
without a mix of other logic.

-- Darin

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Features defines: Platform.h vs build system

2011-10-03 Thread Adam Roben
On Oct 3, 2011, at 10:51 AM, Darin Adler wrote:

 But a while back, Maciej outlined a concept for where to put these platform 
 base include files; I don’t remember when that was or what the details were.

I think the plan is outlined here: 
http://trac.webkit.org/wiki/Porting%20Macros%20plan.

-Adam

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Features defines: Platform.h vs build system

2011-10-03 Thread Anders Carlsson
Speaking of macros, 

I'd like to add a COMPILER_SUPPORTS macro, so we can use it for incrementally 
introducing C++11 features such as variadic templates and rvalue references…

- Anders

On Oct 3, 2011, at 9:53 AM, Darin Adler wrote:

 On Oct 3, 2011, at 8:23 AM, Adam Roben wrote:
 
 I think the plan is outlined here: 
 http://trac.webkit.org/wiki/Porting%20Macros%20plan.
 
 That’s it! I really want to do it!
 
 I noticed that one thing the plan doesn’t state is where the includes of the 
 PortXXX.h files go.
 
-- Darin
 
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev