Johannes Brunen
2017-01-18 10:58:07 UTC
Hi,
on request of Carsten I have split up my 'accumulated changes' into smaller chunks so that it easier to look at them.
This change does only affect the MSVC windows build. OpenSG is traditionally build with the compiler flag /Zi on windows even in the optimized cases. That results in generation of the .pdb database files that can be used for debugging purposes. However, I think that it is recommended to use the following linker flags in that case: /OPT:REF /OPT:ICF in the optimized cases.
/OPT:ICF to perform identical COMDAT folding. Redundant COMDATs can be removed from the linker output.
By default, /OPT:REF is enabled in non-debug builds.
When /OPT:REF is enabled either explicitly or by default, a limited form of /OPT:ICF is enabled that only folds identical functions.
If /DEBUG<https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx> is specified, the default for /OPT is NOREF, and all functions are preserved in the image. To override this default and optimize a debugging build, specify /OPT:REF. Because /OPT:REF implies /OPT:ICF, we recommend that you also specify /OPT:NOICF to preserve identical functions in debugging builds. This makes it easier to read stack traces and set breakpoints in functions that would otherwise be folded together. The /OPT:REF option disables incremental linking.
Best,
Johannes
on request of Carsten I have split up my 'accumulated changes' into smaller chunks so that it easier to look at them.
This change does only affect the MSVC windows build. OpenSG is traditionally build with the compiler flag /Zi on windows even in the optimized cases. That results in generation of the .pdb database files that can be used for debugging purposes. However, I think that it is recommended to use the following linker flags in that case: /OPT:REF /OPT:ICF in the optimized cases.
From the docs: https://msdn.microsoft.com/en-us/library/bxwfs976.aspx
/OPT:REF eliminates functions and data that are never referenced;/OPT:ICF to perform identical COMDAT folding. Redundant COMDATs can be removed from the linker output.
By default, /OPT:REF is enabled in non-debug builds.
When /OPT:REF is enabled either explicitly or by default, a limited form of /OPT:ICF is enabled that only folds identical functions.
If /DEBUG<https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx> is specified, the default for /OPT is NOREF, and all functions are preserved in the image. To override this default and optimize a debugging build, specify /OPT:REF. Because /OPT:REF implies /OPT:ICF, we recommend that you also specify /OPT:NOICF to preserve identical functions in debugging builds. This makes it easier to read stack traces and set breakpoints in functions that would otherwise be folded together. The /OPT:REF option disables incremental linking.
Best,
Johannes