Share via


/LTCG (Windows CE 5.0)

Send Feedback

The /LTCG option tells the linker to call the compiler and perform whole program optimization.

/LTCG[:NOSTATUS|:STATUS]
  • :NOSTATUS | :STATUS (optional)
    Specifies whether the linker should display a progress indicator showing what percentage of the link is complete. The default is to not display this status information.

Remarks

/LTCG is implied with /GL - Enable Link-time Code Generation. If you use /GL with /c, you can use /LTCG when you link your .obj files for the fastest possible build performance.

When /LTCG is used with either /Og - Enable Global Optimization, /O1, /O2 - Specify Small or Fast Code, or /Ox - Use Maximum Optimization, the following optimizations are performed:

  • Cross-module inlining
  • Custom calling convention (x86 only)
  • Small TLS displacement (x86 only)
  • Stack double alignment (x86 only)
  • Improved memory disambiguation (better interference information for global variables)

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

If /LTCG and /Ogs are specified, double alignment is not performed.

If most functions in an application are compiled for speed, with a few functions compiled for size (for example, by using the optimize pragma), the compiler double-aligns the functions that are optimized for size if they call functions that need double alignment.

See Also

Linker Options

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.