Project

General

Profile

Defect #2

do something about cl 'optimizing' out inline singleton registration voodoo

Added by Tony Ciavarella over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
02/28/2013
Due date:
% Done:

100%

Estimated time:

Description

GCC and Clang/LLVM behave in a sane manner, but the stupid cl seems to 'optimize' out the damn registrations for all the damn PDUs and such.

It seems necessary to do something about it. Maybe there's a compiler option to make it behave.

Associated revisions

Revision 432:a005cb846ebb (diff)
Added by Tony Ciavarella over 6 years ago

changed the location of the PDU factory registrations in an attempt to avoid silly linkers throwing out the registrars (refs #2)

History

#1 Updated by Tony Ciavarella over 6 years ago

It seems like link is throwing out the symbols due to unreferenced COMDAT elimination as described on MSDN. The simple answer is to pass /OPT:NOREF to the linker, but that won't help with singleton registrations in user code and requiring such a linker option in user code seems unwise.

#2 Updated by Tony Ciavarella over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

r432 seems to have made things happy without causing any weirdness.

Also available in: Atom PDF