Remaining Travis merge-2.064 failure

Christian Kamm via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Mon Jun 9 01:44:39 PDT 2014


On 09.06.2014 09:29, Christian Kamm wrote:
> My runtime/std/stdio.o also only has a
> U _D6object15__T8capacityTaZ8capacityFNaNbNdAaZm
> so I think I can reproduce it locally.

The symbol isn't emitted because its instantiatingModule is std.bitmanip
- which is not a root module - and thus the function is ignored by
DtoDefineFunction.

I think the comment in there (functions.cpp:922) is wrong. The frontend
seems to try hard to make sure instantiatingModule is a non-root module
if possible. That should mean LDC is not emitting templates that have a
non-root module instantiating them somewhere.

The idea probably is that you shouldn't need to emit functions again if
they were already emitted into a library you import and link. (if that's
desired, the correct fix is probably to require -lcurl when linking
phobos...)

I wonder if you can break that behavior with a cycle of
imports-that-instantiate. But I couldn't make a failing test case.

Cheers,
Christian


More information about the digitalmars-d-ldc mailing list