We can build static library directly from the compiler:

$ ldc2 --lib app.d

produces app.a file with app.o inside of it.

Are there simple way to make a static library that also includes necessary standard D libraries (i.e., phobos2 and druntime)?

Compiler already knows (?) paths to default static libs because it have --static option which produces static executable with all necessary libs inside. (Although I'm not sure that it works by this way)

Point is that D can be not a main language of the project and it is unconvient to extract by somehow paths to phobos and druntime at last stages of project build.

Reply via email to