[Issue 23974] A ModuleInfo in a separate Windows DLL should not be referred to by MIimportedModules

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 6 00:23:00 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23974

--- Comment #4 from Richard Cattermole <alphaglosined at gmail.com> ---
(In reply to Walter Bright from comment #2)
> A module is imported (and outside the binary) when it contains exported

This may not be true. Separate compilation is quite common when creating shared
libraries. To clarify: outside of binary means outside of dll/exe, rather than
outside of object file (just so we are all on the same page).

You can have a dependency that was built as a static library, that was later
linked in, that must be accessed via internal symbols and not dllimport.

We do this today with dub.

It also depends upon the use of a .di generator that is functioning correctly
(which the avoidance of was a motivating factor for Martin in his work with
ldc).

This is why we must parameterize export with a version identifier to be able to
tell the compiler if a symbol is dllimport or internal based on what stage it
is in the compilation process.

We have got to account for modules being bindings, while also containing D code
that needs to be compiled and accessed internally.

--


More information about the Digitalmars-d-bugs mailing list