New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile DUB binaries with LDC #1419
Comments
LDC doesn't enforce the ld option |
> LDC doesn't enforce the ld option --export-dynamic as DMD does, that's why the stacktrace is missing the symbol names (or rather the stack trace generator in druntime not reading from dwarf debuginfo but from the dynamic symbols table IIRC). See also: dlang#1419 (comment)
Nice! I just tested this (without LTO) and with I haven't gotten around creating a real benchmark for dub, so I just use a naive "dub describe". Anyhow, I made a PR for this: #1420 |
> LDC doesn't enforce the ld option --export-dynamic as DMD does, that's why the stacktrace is missing the symbol names (or rather the stack trace generator in druntime not reading from dwarf debuginfo but from the dynamic symbols table IIRC). See also: dlang#1419 (comment)
Fix #1419 - Use LDC by default for the released binaries
(from a recent discussion #1369 (comment) in which the resulting size of a DUB's binary was discussed)
DUB is currently compiled with DMD, because LDC doesn't support showing the stack for exceptions, but imho the increase in speed and reduced side justifies overlooking this. After all, this is a production release - not a debug build.
LDC has LTO easily available which results usually in ~10% performance improvement and also a noticeable binary size reduction.
I haven't done big tests, but a build of vibe.d without needing to rebuild goes reproducible down from 0.22s to 0.15s
So my question: how big of a performance gain would justify the missing stack trace for exceptions?
(reminder: here's what DMD generates https://run.dlang.io/is/vzByQy vs. LDC: https://run.dlang.io/is/6iG8ai)
This issue is just about the separately built binaries.
(there's https://issues.dlang.org/show_bug.cgi?id=18656 for the bundled dub with the official release archives)
The text was updated successfully, but these errors were encountered: