ldc-developers/ldc

ldc expects shared libraries even thought explicitly asks for a static build

ryuukk opened this issue · 2 comments

ldmd2 -L-static ...

/usr/bin/ld: cannot find -lphobos2-ldc-shared: No such file or directory
/usr/bin/ld: cannot find -ldruntime-ldc-shared: No such file or directory

Why does it complain about SHARED when passing STATIC? don't error

-L... passes a flag to the linker only, it is ignored by the compiler. So you are actually not asking the compiler for a static build.

I.e., there's a -static switch for LDC itself, which implies -L-static and defaults to -link-defaultlib-shared=false.