https://issues.dlang.org/show_bug.cgi?id=23974
Rainer Schuetze <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #6 from Rainer Schuetze <[email protected]> --- I don't think this issue is a real problem: - it's not easy to create DLLs with cyclic import dependencies, and even if you manage to do it, the system won't load them AFAICT. - so DLLs already have a "higher level" ordering that respects the required module initializer order - static initializers already contain a check to avoid multiple executions, so it is no problem that it might get called across DLL boundaries, it just does nothing. The actual difficulty is that the dependency between modules is part of the ModuleInfo and needs a data relocation through the import table. This is not supported by the OS. https://github.com/dlang/dmd/pull/14849 solves this similar to LDC by running some initializers before most of the C runtime is started. This is needed for other data entries as well (e.g. TypeInfo), so it does not help a lot to avoid it for ModuleInfo. --
