Relation between MSVC Compiler & linker option for COMDAT folding
问题 This question has some answers on SO but mine is slightly different. Before marking as duplicate, please give it a shot. MSVC has always provided the /Gy compiler option to enable identical functions to be folded into COMDAT sections. At the same time, the linker also provides the /OPT:ICF option. Is my understanding right that these two options must be used in conjunction? That is, while the former packages functions into COMDAT, the latter eliminates redundant COMDATs. Is that correct? If