[Issue 24299] The dmd's command line option "-run" should prefer dynamic linking with the Phobos library by default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 24 04:23:44 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=24299

--- Comment #4 from Siarhei Siamashka <siarhei.siamashka at hotmail.com> ---
(In reply to ryuukk_ from comment #2)
> You mention go, but go does statically link everything
> 
> So you are not matching go in your comparison, you are doing something
> different to pretend it runs faster

The DMD compiler doesn't produce any binary for the end users as a result of
using "-run" option, so the choice of static or dynamic linking is a hidden
internal implementation detail not visible to the end user.

If you think that this kind of "cheating" is unfair to Go, then Go is already
"cheating" to an even larger extent by using a custom non-standard format for
the object files and relying on its own custom linker to process them. See
https://go.googlesource.com/proposal/+/master/design/go13linker.md

> The solution is to make phobos less bloated, let us not put the problem
> under the carpet to pretend it's clean

There's no such thing as "the solution" here. Compilation time can be reduced
by doing multiple independent optimizations. Each of them contributes
something. Currently there are many low hanging fruits.

Even if you succeed in making Phobos less bloated, using dynamic linking
instead of static linking will be still beneficial.

--


More information about the Digitalmars-d-bugs mailing list