[webkit-dev] IDL generation: [Conditional=XXX] vs. #if defined(ENABLE_XXX)
Adam Barth
abarth at webkit.org
Sun Jul 3 02:29:48 PDT 2011
Does this cause a concrete problem? I guess there are some
configurations that don't build? Generally, configurations without
buildbot won't actually build. The Qt minimal bot helps keep us
honest in this regard, but I suspect there are lots of configurations
that don't actually build.
Adam
On Sun, Jul 3, 2011 at 2:12 AM, Patrick Gansterer <paroga at paroga.com> wrote:
> IMO [Conditional=XXX] does not generate correct output (only tried JSC). It adds top many header includes.
>
> Example with DOMWindow.idl:
> The line
> attribute [Conditional=DATABASE] SQLExceptionConstructor SQLException;
> adds #include "JSSQLException.h" independently of ENABLE_DATABASE.
>
> The lines
> #if defined(ENABLE_DATABASE) && ENABLE_DATABASE
> attribute SQLExceptionConstructor SQLException;
> #endif
> generate the #include only if ENABLE_DATABSE is true.
>
> If we add "JSSQLException.h" unconditionally we also need to generate the corresponding IDL all the time.
>
> I see three possible solutions:
> 1) Always generate all IDL files.
> 2) Change all [Conditional=XXX] to #if define(ENABLE_XXX).
> 3) Add the correct #if ENABLE(XXX) around the header includes.
>
> BTW: Should we unify the #if defined(ENABLE_XXX) and [Conditional=XX] in all IDL files?
>
> - Patrick
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
More information about the webkit-dev
mailing list