Thread overview
ldc depends on phobos
Oct 09
Joakim
Oct 10
kinke
October 09
I tried building ldc without linking against phobos and got a handful of link errors.  Has it been decided to selectively use phobos in the ldc compiler?

For example, pruneCache is implemented in D and called from codegenModules:

https://github.com/ldc-developers/ldc/blob/master/driver/main.cpp#L1122
https://github.com/ldc-developers/ldc/blob/master/driver/cache.cpp#L481
https://github.com/ldc-developers/ldc/blob/master/driver/cache_pruning.d#L28

The last file with the D implementation uses imports from phobos, it was added before the 1.1 release:

https://github.com/ldc-developers/ldc/pull/1753

There's another in the frontend:

https://github.com/ldc-developers/ldc/blob/master/ddmd/mtype.d#L2848

And finally, some functions from ddmd.builtin seem to call some std.math functions.
October 09
On Monday, 9 October 2017 at 11:27:55 UTC, Joakim wrote:
> I tried building ldc without linking against phobos and got a handful of link errors.  Has it been decided to selectively use phobos in the ldc compiler?

Yes.
(the requirement is that we should support "old" Phobos versions, LDC LTS 0.17 and upward)

-Johan
October 10
On Monday, 9 October 2017 at 16:57:35 UTC, Johan Engelen wrote:
> On Monday, 9 October 2017 at 11:27:55 UTC, Joakim wrote:
>> I tried building ldc without linking against phobos and got a handful of link errors.  Has it been decided to selectively use phobos in the ldc compiler?
>
> Yes.
> (the requirement is that we should support "old" Phobos versions, LDC LTS 0.17 and upward)
>
> -Johan

So if I have an existing ldc installation, build a new ldc using the old one, linking to shared phobos, then install the new one over the old, I'll likely get runtime linker errors running the compiler due to incompatible Phobos versions?
October 10
On Tuesday, 10 October 2017 at 03:13:03 UTC, John Colvin wrote:
> On Monday, 9 October 2017 at 16:57:35 UTC, Johan Engelen wrote:
>> On Monday, 9 October 2017 at 11:27:55 UTC, Joakim wrote:
>>> I tried building ldc without linking against phobos and got a handful of link errors.  Has it been decided to selectively use phobos in the ldc compiler?
>>
>> Yes.
>> (the requirement is that we should support "old" Phobos versions, LDC LTS 0.17 and upward)
>>
>> -Johan
>
> So if I have an existing ldc installation, build a new ldc using the old one, linking to shared phobos, then install the new one over the old, I'll likely get runtime linker errors running the compiler due to incompatible Phobos versions?

Probably. Anyway, Phobos wouldn't be treated any different than druntime.