Troubleshooting DUB invocations
Dukc
ajieskola at gmail.com
Wed Nov 13 15:00:07 UTC 2019
On Tuesday, 12 November 2019 at 18:32:32 UTC, kinke wrote:
>
> Dub is open-source, so you can grep the source. - Dub uses it
> for all 3 compilers (e.g.,
> https://github.com/dlang/dub/blob/f87302dd206b0e5871b39704e694b2194e294aa5/source/dub/compilers/ldc.d#L249), and I'm not sure it's really needed. Anyway, you can also use another linker that supports this flag (e.g., via `-linker=gold`).
Thanks. At first it didn't seem to work. Then I realized that the
`--link-internally` flag that's specified in `ldc.conf` prevents
changing the linker. Took it off, and the gold linker understood
the flag in question, but had problems with others. I tried
removing some, but there were still more to remove. Getting WASM
code to link tends to be trial and error in my experience, so I
decided best not to stray far from what Spasm does.
I also tried LDC 1.18, but the dub also added that unwanted flag
here. I don't wan't to use older LDC than that.
However, extracting the LDC invocation and manually calling it
without `--no-as-needed` appears to work. Solution? I'm going to
write my `build.d` to do just that automatically.
Is there an issue about that already, or should I open one?
More information about the Digitalmars-d-learn
mailing list