I am running a large application containing xxx source files (Visual Studio 2010).
For some years, we have compiled our release builds with / Zi to get a PDB file that is stored on our character server. Over the years, we noticed that our build scripts are getting slower and slower, and now it takes more than 2 hours to create an executable file.
Questions: What are the implications of using / Zi vs / Z7 for Visual Studio C ++ projects? seem to indicate that / Z 7 is old, and that / Zi is preferred.
However, we tried to run our build scripts using / Z 7, and we saw a significant reduction in time from more than 2 hours to 20 minutes. We also experimented with using / Zi, but 1 PDB file per source file (which the linker still merges into one large PDB file), and this also improves compilation performance, but slightly reduces connection time performance.
To optimize the build time, I would like to go back to / Z 7 (the linker still generates a PDB file at the end), but I'm not sure if this will affect the "debug" operation of the application.
Questions:
- The internal debug format of the PDB file generated by the linker is different when compiling with / Z 7 compared to / Zi (maybe the format is the same, just the place where the debug information is stored by the compiler is different)?
- /Z 7 /Zi?
- (/Zi,/Z7) ?