www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - ModuleInfo and -fno-moduleinfo option

reply Marius Cristian Baciu <baciumariuscristian yahoo.com> writes:
Hello,

As a general question, what is the purpose of ModuleInfo, 
constructing and deconstructing each of the runtime's modules? In 
other words, what are the ramifications of using gdc's 
-fno-moduleinfo option?
I am asking this because I found that skipping its generation 
solves the problems generated by DSO registration in environments 
with no knowledge of a dynamic linker. However, I doubt this was 
among the initial motives for creating this compiler option and I 
would like to be aware of all implications.

Thank you,
Cristi
May 25 2020
parent kinke <kinke gmx.net> writes:
ModuleInfos are essential for the module ctors and dtors (of used 
modules) to be run, incl. a dependency tree defining their order 
of execution. They're also needed for running the unittests.
May 26 2020