how do I pass --whole-archive and --no-whole-archive to dub?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.com
Thu Aug 6 19:31:01 UTC 2020
On 8/6/20 2:19 PM, rikki cattermole wrote:
> In theory it should be as simple as setting it in lflags.
>
> But you will need to test it, as I'm not sure if it'll propagate upwards
> to where you need it.
>
> If that doesn't work, having dub automatically handle registration
> functions would be a nice feature request to have.
I did try this:
lflags "--whole-archive" "/path/to/libmylib.a" "--no-whole-archive"
But that doesn't work, presumably because the command line contains the
same library before these flags. So I assume the first occurrence is
taken and the second ignored.
As an aside, it is very irritating that dub multiplies the flags for
some reason, e.g. -defaultlib=libphobos2.so appears literally 30 times
in the same command line. Similar for other flags.
More information about the Digitalmars-d
mailing list