[webkit-dev] Proposal for a new way to handle porting #ifdefs

Peter Kasting pkasting at google.com
Sun May 24 21:28:52 PDT 2009


On Sun, May 24, 2009 at 12:19 AM, Maciej Stachowiak <mjs at apple.com> wrote:

> On May 23, 2009, at 9:38 AM, David Kilzer wrote:
>
> There are essentially two options here:
>
> 1. Add #if/#endif guards to entire source files, but include every file in
> every build system.
>
> 2. Make each build system smart enough to exclude source files that
> implement a feature, thus pushing the policy decision down (up?) into the
> build system (which is where most of the decisions are made today anyway).
>
>
> I know there is a potential compile time tradeoff, but in some ways it
> would be nicer if all build systems built the same set of files, and we
> ifdef'd the contents. That would put the policy decisions all in one place
> (the port header).
>

It seems like build systems will already differ insofar as they include
various explicitly platform-specific files ("foo_bar_gtk.cc") so differing
more doesn't seem to hurt much.

My bias is always against #ifdefs so I feel more like David Kilzer does --
option #2 feels a lot cleaner to me.  On the other hand my experience is
much more with Chromium ports instead of WebKit ports so my opinion should
probably be discounted :)

PK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090524/01abeb1d/attachment.html>


More information about the webkit-dev mailing list