We have a large project, >1M lines of code in about 300 DLLs. So far we've been using VS6.
I've now converted everything to VS2008, all compiles, links and more importantly - runs!
==>However... the resulting compiled OBJ files are X 10 bigger and linking is extremely slow, with the linker hitting >1GB of memory quite often.
Part of the implications are that I need to compile certain prjects with /bigobj.
Result is a build that went from about 1:45 on a desktop to 3h. The DLLs and the LIBs are roughly the same size as in the old VS6 build.
I've read all I could find here but didn't find a remedy to this problem. If it is additional DEBUG info - I don't want it. I had enough before. The size in release increased, but not so much...
Anyone has any idea? Or is my only option to break down the projects into much smaller units? Is refactoring my only hope?! Surely there's a secret flag I missed...
Check your debugging options. /Z7
causes large .OBJ files, /Zi
puts the same information in a separate .PDB file.
Compiler option /Oi
may help by inlining intrinsic function, which then no longer need to be linked. You probably don't want to debug memset
anyway.
Turn off /Gm
(incremental rebuild) so you can turn on /MP
(parallel build). Also turn off /Gy
- while it makes for smaller EXE's, it causes bigger OBJ files and slower linking.
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