You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#3916 - undefined symbols with -dllimport=all on Windows
Instantiated data symbols were previously never dllimported with
`-dllimport=all`. So if the parent template instance wasn't
codegen'd into the binary directly, it remained undefined.
For `-dllimport=defaultLibsOnly`, the 'solution' to this problem
was to define-on-declare data symbols instantiated from druntime/
Phobos templates, making sure each binary defines all such symbols
it references.
In both cases, switch to an approach where we dllimport all
instantiated data symbols (or druntime/Phobos symbols only), and
dllexport them whenever defining them (so that other object files
or binaries can import them). This may lead to more 'importing
locally defined symbol' linker warnings, but may also lead to less
duplicates and possibly 'proper' sharing of instantiated globals
across the whole process.
This is superfluous and skipped with `-linkonce-templates`, as
that mode defines all referenced instantiated symbols in each
binary anyway, and so has already been a workaround.
0 commit comments