On Mon, Oct 17, 2016 at 8:18 AM, Jochen Eisinger <joc...@chromium.org>
wrote:

>
>
> On Fri, Oct 14, 2016 at 8:19 PM Adam Klein <ad...@chromium.org> wrote:
>
>> I take it from your omission that code which isn't accessed anywhere but
>> within src doesn't need any export macro?
>>
>
> well, within the same compilation unit.
>
> If src/d8.cc access something in src/factory.h the latter needs to be
> exported. (d8.cc goes into d8 while factory.h goes into v8_base).
>

Do you mean something other than "compilation unit" ("shared library",
perhaps?) here? I think of a compilation unit as being, e.g., "factory.cc
and all its includes" (which generates factory.o). So the example would be,
what if I access something in factory.h from objects.cc?


> Same holds true for src/ vs src/base.
>
> best
> -jochen
>
>
>>
>> On Fri, Oct 14, 2016 at 6:47 AM, Jochen Eisinger <joc...@chromium.org>
>> wrote:
>>
>> Hey,
>>
>> we recently started to support component builds for almost all binaries.
>> With this, it might happen that debug bots fail to link because they can't
>> find certain symbols.
>>
>> Here is what to do:
>>
>> If the symbol is supposed to be visible to embedders, e.g., it's in
>> include/v8.h, then add the V8_EXPORT macro.
>>
>> If the symbol is used by tests only, e.g., it's in src/, add the
>> V8_EXPORT_PRIVATE (defined in src/globals.h) macro (or if it's in src/base/
>> V8_BASE_EXPORT defined in src/base/base-export.h or in src/libplatform
>> V8_PLATFORM_EXPORT defined in include/libplatform/libplatform-export.h)
>>
>> Annotate classes like this:
>>
>> class V8_EXPORT Foo {
>> };
>>
>> or individual methods or functions like this
>>
>> V8_EXPORT bool DoStuff();
>>
>> For the public API (V8_EXPORT) we generally export everything. For test
>> only stuff, we might wish to not export some base classes. In that
>> situation, you have to annotate the base classes with NON_EXPORTED_BASE
>> defined in src/base/compiler-specific.h like this:
>>
>> class V8_EXPORT_PRIVATE Foo : public NON_EXPORTED_BASE(Bar) {
>> };
>>
>> If you annotated everything, but e.g. a symbol from src/base is still not
>> found, it might be that the executable does not depend on v8_libbase (in
>> this example) - you'll have to add the dependency in the BUILD.gn (and
>> corresponding gyp file) then - but this should be rare, only if you add new
>> binaries.
>>
>> best
>> -jochen
>>
>> --
>> --
>> v8-dev mailing list
>> v8-dev@googlegroups.com
>> http://groups.google.com/group/v8-dev
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to v8-dev+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> --
>> v8-dev mailing list
>> v8-dev@googlegroups.com
>> http://groups.google.com/group/v8-dev
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to v8-dev+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to