The VC++ 2003 linker can perform cross-module optimizations if it has
been invoked with the /LTCG option. Do such optimizations apply to
native modules (.obj and .lib files compiled without /LTCG) as well?

Re: Are native modules subject to LTCG optimizations? by Alex

Alex
Sun Nov 27 03:40:37 CST 2005

Angel Tsankov wrote:
> The VC++ 2003 linker can perform cross-module
> optimizations if it has been invoked with the /LTCG
> option. Do such optimizations apply to native modules
> (.obj and .lib files compiled without /LTCG) as well?

/LTCG is _linker_ switch, so it's impossible to specify
/LTCG for compiler. There is /GL switch for compiler to make
binaries suitable for further link-time code generation by
linker.