dub ldc2 static linking

Sergey kornburn at yandex.ru
Fri Oct 28 06:51:59 UTC 2022


On Friday, 28 October 2022 at 04:02:15 UTC, ryuukk_ wrote:
> On Friday, 28 October 2022 at 02:46:42 UTC, ryuukk_ wrote:
>> On Friday, 28 October 2022 at 01:35:04 UTC, kinke wrote:
>>> For fully static linking on Linux, you'll need to move away 
>>> from glibc to e.g. the musl C runtime, as used by the Alpine 
>>> distro.
>>
>> I'm just right now having an issue with glibc version mismatch 
>> for my server, so i'm looking to move to musl to avoid that 
>> kind of issues
>>
>> Is there any guide to compile ldc with musl and then static 
>> link it?
>
> Actually nvm, `-static` as mentioned above seems to be enough

Static on alpine is possible - be aware of ‘ldc-static’ package. 
But static and LTO is something harder.. is it even possible 
without re-compilation of ldc-runtime?
  
https://forum.dlang.org/thread/newwjfrebckphgwgarvq@forum.dlang.org



More information about the Digitalmars-d-learn mailing list