I tried looking online for the differences but couldn't get a lot. The two options sound related to each other:
/LTCG: https://msdn.microsoft.com/en-us/library/xbf3tbeh.aspx
The /LTCG option tells the linker to call the compiler and perform whole-program optimization.
/GL: https://msdn.microsoft.com/en-us/library/0zza0de8.aspx
Enables whole program optimization.
Does anybody know the exact difference?
/GL
is a compiler option and /LTCG
is a linker option. According to the documentation they are closely related to each other. For example:
/LTCG
is implied with/GL
However, /LTCG
can be employed without using /GL
.
The
/LTCG
option tells the linker to call the compiler and perform whole-program optimization. You can also do profile guided optimization.
How is profile guided optimization enabled? By using the /GL
option.
/GL
also makes profile guided optimization available; see/LTCG
What is profile guided optimization? Here's a snippet from the start of the profile guided optimization documentation:
Profile-guided optimization lets you optimize an output file, where the optimizer uses data from test runs of the .exe or .dll file. The data represents how the program is likely to perform in a production environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With