Skip to content
  • Chun-wei Fan's avatar
    MSVC 2010+ builds: Explicitly use /LTCG · dc4361f4
    Chun-wei Fan authored
    The Visual Studio projects used a default setting for link-time code
    generation, which is a part of the various linker optimizations that is
    available, which is set as /LTCG for Visual Studio 2013 and earlier.
    
    This changed in Visual Studio 2015 to become /LTCG:incremental, which would
    cause GResources-generated code to be optimized out during linking, unless
    they were referred to directly in the main line code (such as when the
    GResource is manually registered), causing programs to crash as a result as
    they can't find the needed code/data at run time.
    
    Fix this by explicitly setting /LTCG for all release builds, for Visual
    Studio 2010 and later.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752837
    dc4361f4