Author Topic: Compiler option like msvc -Gy  (Read 2534 times)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1924
Compiler option like msvc -Gy
« on: September 03, 2011, 09:31:53 am »
Can PellesC have similar option ?
The /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


  • Guest
Re: Compiler option like msvc -Gy
« Reply #1 on: September 03, 2011, 03:06:34 pm »
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)