[webkit-dev] [Conditional=] vs. #if in IDL files

Steven Coul (scoul) scoul at cisco.com
Mon Mar 9 05:39:02 PDT 2015


Would [Conditional] use through out also not allow us to perform the IDL compile without running the c preprocessor on each file? 

Can [Conditional] not be fixed to support multiple flags?

The compiling of IDL is a significant portion of the total build time, and ccache distcc et al cannot help us there.

Steve "Harry" Coul
scoul at cisco.com



On Mar 7, 2015, at 6:47 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> On Sat, Mar 7, 2015 at 8:55 AM, Darin Adler <darin at apple.com> wrote:
> Why do we have [Conditional=] in our IDL files? Perhaps because some ports lacked a way to do #if in the past?
> 
> I think Conditional is a nicer/newer way of if-defing based on feature flags.
>  
> Should we use #if or [Conditional]? See for example, HTMLMediaElement.idl, which has a mix of both styles. It’s pretty ugly how the #if look in the IDL files, but even worse is a seemingly random mix of both #if and [Conditional].
> 
> We should use Conditional as much as possible.
> 
> As far as I know one area we can't use Conditional= is if something depends on multiple feature flags or if it's specific to a binding language (JS/Objective-C/etc...).  We should probably add a special feature flag for that; e.g. Conditional=JS.
> 
> - R. Niwa
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150309/4eb3f53e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150309/4eb3f53e/attachment.sig>


More information about the webkit-dev mailing list