[dmd-internals] Fwd: -defaultlib vs -debuglib semantics

Михаил Страшун via dmd-internals dmd-internals at puremagic.com
Fri May 20 09:28:15 PDT 2016


Poking the mail list as it doesn't seem to be explained in details on
dlang.org

Recently we got to situation where it has become necessary to package
both debug and release builds of runtime because keeping
asserts/contracts in runtime has huge negative performance impact (2x
slowdown for some of our projects). I hoped to make use of built in
-defaultlib / -debuglib switches to link to correct one automatically
but was quite surprised to find out that -debuglib is only used when -g
flag is supplied. Presence or absence of -release / -debug make no
difference here, only -g.

Is this by design? Would that be something you could consider changing?
Keeping debug symbols in libraries has very low performance impact
compared to keeping contracts, there doesn't seem to be any practical
reason to connect linking special kind of library to it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20160520/c581fef7/attachment.html>


More information about the dmd-internals mailing list