June 06, 2014
On Wednesday, 4 June 2014 at 15:18:22 UTC, Dan Olson wrote:
>
> LDC also uses global ctors to build the ModuleInfo list.  A problem with
> calling rt_init() in a global ctor means that ModuleInfo is probably
> incomplete, meaning some or no module ctors (static this) are called.  I
> thought perhaps the LDC_global_crt_ctor optional priority arg could
> help, but makes no difference on OSX at least.

haven't noticed this on linux. I have noticed that druntime does not like it when you call rt_init or rt_term more than once, which kind of precludes multiple shared libs with this scheme.
June 06, 2014
"Ellery Newcomer" <ellery-newcomer@utulsa.edu> writes:

> On Wednesday, 4 June 2014 at 15:18:22 UTC, Dan Olson wrote:
>>
>> LDC also uses global ctors to build the ModuleInfo list.  A problem
>> with
>> calling rt_init() in a global ctor means that ModuleInfo is probably
>> incomplete, meaning some or no module ctors (static this) are
>> called.  I
>> thought perhaps the LDC_global_crt_ctor optional priority arg could
>> help, but makes no difference on OSX at least.
>
> haven't noticed this on linux. I have noticed that druntime does not like it when you call rt_init or rt_term more than once, which kind of precludes multiple shared libs with this scheme.

Hmmm, rt_init/rt_term source looks like it is designed to be called multiple times.  Is it because LDC currently only has runtime as static lib so each of your shared libs has own copy of runtime?  I bet it will work once LDC has shared lib runtime/phobos.

http://forum.dlang.org/post/mailman.94.1396646137.19942.digitalmars-d-ldc@puremagic.com
June 06, 2014
On Friday, 6 June 2014 at 05:52:21 UTC, Dan Olson wrote:
>
> Hmmm, rt_init/rt_term source looks like it is designed to be called
> multiple times.

oo. this is new. looks like it happened here

https://github.com/D-Programming-Language/druntime/commit/cd42380a568c41c2b9bd2e1d14c39c4fdc8c859e

time to dust off pyd and try this use case again.
June 06, 2014
On Friday, 6 June 2014 at 13:00:42 UTC, Ellery Newcomer wrote:
> On Friday, 6 June 2014 at 05:52:21 UTC, Dan Olson wrote:
>>
>> Hmmm, rt_init/rt_term source looks like it is designed to be called
>> multiple times.
>
> oo. this is new. looks like it happened here
>
> https://github.com/D-Programming-Language/druntime/commit/cd42380a568c41c2b9bd2e1d14c39c4fdc8c859e
>
> time to dust off pyd and try this use case again.

by gumbo, it works
Next ›   Last »
1 2