Hacker News new | ask | show | jobs
by khuey 4769 days ago
The problem is link time code generation. With link time optimization[0], which is a prerequisite for profile guided optimization, cl just compiles the source into some intermediate representation. Actual code generation is all done in link.exe at the final link. And /machine:x86 doesn't work with link.exe when using -GL. The x64 link.exe is not capable of generating x86 binaries with LTO.

[0] http://msdn.microsoft.com/en-us/library/0zza0de8%28v=vs.100%...

(Mozilla is building with 2010 now.)

2 comments

> (Mozilla is building with 2010 now.)

Also note that the problem still exists in VS2012, and in fact is even worse because the linker memory usage has gotten higher in general. Fortunately we now have a fairly good workaround (developed with help from Microsoft -- maybe some of the people in this thread?) that limits which files participate in PGO:

https://bugzilla.mozilla.org/show_bug.cgi?id=871712

Ahh, one variable I hadn't factored in. The mix-n-match option mish-mash of C++ is so fun :)