[webkit-dev] exporting symbols for building .so/.dll's
fischman at chromium.org
Fri Mar 9 13:45:17 PST 2012
Thanks for your reply, Morrita!
> For ports on approach "C", it doesn't matter which WebCore/JSC API is
used from WebKit API layer because they are built in the same library.
If you mean that nothing in WebCore/JSC needs to be annotated as exported
then I don't think that's right, because libwebkit.so has various other
libwebcore_*.a's linked into it.
E.g. if I revert the change I made to
have ChromiumThreading be declared WTF_EXPORT, then the link of
webkit_unit_tests fails because libwtf.a
WTF::ChromiumThreading::callOnMainThread which is a hidden symbol in
Maybe I misunderstood your point?
For JSC API, which "A" and "B" folks care about, there are two ways to
> export it.
> - For Mac (and WX?) port, there are macro-based annotations like
> JS_EXPORT, WTF_EXPORT_PRIVATE.
> annotations, but the migration isn't finished yet. (http://wkb.ug/76257)
> For WebCore API, we only need to care about WebCore.exp.in because Mac
> port is the only one which follows "A" pattern. (I remember Windows
> port used to use this pattern. But it looks no longer the case. Maybe
> they changed the way when they switched to WebKit2. But my memory
> might be just wrong...)
I'm curious whether you have plans (or know of others' plans) to replace
WebCore.exp.in in favor of macros, like you did in http://webk.it/72854 for
My personal preference is to introduce WebCore version of export
> macros like WK_EXPORT_PRIVATE. In this way, we could use it to get rid
> of WebCore.exp.in in the future.
Isn't that what
is? (contrary to the macro's name, it lives in WebCore; perhaps it is
trickier than I realize and somehow only applies to WebKit code even though
it lives in WebCore? Or maybe it just needs to be renamed?)
Yet another approach could be just giving up to have the unit test as a
> separate binary and build it into the library for non-prod
> configuration. The last one seems exactly what you are trying to avoid
Right; linking test code into the main library is what HEAD does now.
> Anyway, I'd like to hear thoughts from other folks.
Me too. As someone pointed out to me, others might be too busy with the
git thread to reply to this one :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev