NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

/LTCG (Link-time Code Generation)

/LTCG

Tells the linker to call the compiler and perform whole program optimization. /LTCG is called for you when you use the /GL compiler option.

If you use /GL with /c, you can use /LTCG when you link your .obj files and create the output file for the fastest possible output-file creation time.

/LTCG is not valid for use with:

When /LTCG is used with either /Og, /O1, /O2, or /Ox, the following optimizations are performed:

Using /LTCG and /Ogt will result in double alignment optimization.

If /LTCG and /Ogs are specified, double alignment will not be performed. If most of the functions in an application are compiled for speed, with a few functions compiled for size (for example, by using the optimize pragma), the compiler would double align these functions that are optimized for size if they call functions that need double-alignment.

See Also

Setting Linker Options | Linker Options | FAQ: Building Your Program