On Saturday, 22 August 2015 at 09:44:48 UTC, Martin Nowak wrote:
The export seems to be an arbitrary rule (and export is really
broken currently).
Let's just use every class that is linked into the binary (e.g.
weakly referencing them), then it'll naturally work with all
linker functionalities.
This doesn't only affect Object.factory but also
ModuleInfo.localClasses.
I'd suggest we first add a new internal array of weakly linked
classes, turn localClasses into an opApply function or range so
it automatically skips null classes (weakly undefined), then
change Object.factory to only load weakly linked classes.
For an intermediate time we can keep the old array and print a
deprecation warning in Object.factory when a class would no
longer be available.
https://github.com/D-Programming-Language/dmd/pull/4638
How do you implement weak linking? It would be really usefull for
my DLL work as well, but I couldn't find any way to make it work
with the microsoft linker.