Compiler option like msvc -Gy

Started by TimoVJL, September 03, 2011, 09:31:53 AM

Previous topic - Next topic

TimoVJL

Can PellesC have similar option ?
QuoteThe /Gy switch is also very useful. It generates a separate COMDAT for each function, giving the linker more flexibility when it comes to removing unreferenced COMDATs and COMDAT folding. The only downside to using /Gy is that it can have a minor effect on build time. Therefore, it is generally recommended to use it. For more information, see /Gy (Enable Function-Level Linking).
May the source be with you

CommonTater

Hi Timo... 
I too would like to see smart linking (of the real kind).

The easy way around this, for now, is to create separate source files for each function.  They get turned into objects, objects are linked separately... thus smart linking (of a sort).  (See my various libraries here for an example)