PDA

View Full Version : What the point of using -GL



pyfqrf
18th May 2009, 12:21
Hi folks,

I wonder what the benefit of using -GL compiler option when compiling Qt on Windows? It's clear to me that using -GL leads to significantly slowdown linking ( especially with statically linked Qt. ). So what the point of using -GL?

Boron
18th May 2009, 18:00
Much to read: http://msdn.microsoft.com/en-us/magazine/cc301698.aspx
To be honest, I have not read the whole article. My brain still is too destroyed from the weekend :D. This is too much English text for me.

As far as I have understood the text, when using /GL the compiler doesn't generate target specific code. It generates some sort of IL (intermediate language).
The linker will take this IL code, does some magic and generates target specific code itself.
But it still is not clear to me under what circumstances this is better compared to when the compiler generates target specific code directly :confused:.

[edit]
By the way: This was my 100th post. I'll have a last bottle of beer to celebrate this :).

[edit2]
Sorry. My fault.
/GL ist not the "Link-time Code Generation". It is just one step to enable it.
/GL is explained here: http://msdn.microsoft.com/en-us/library/0zza0de8.aspx