[PATCH] D55056: [CMake] Default options for faster executables on MSVC

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 13:24:43 PST 2018


aganea added a comment.

In D55056#1317377 <https://reviews.llvm.org/D55056#1317377>, @rnk wrote:

> Makes sense, but LLVM_ENABLE_PDB doesn't make sense on non-Windows OSs. We also have to consider that linking with debug info enabled on Linux is painfully slow, so it might make more sense to make it off by default. I learned to build in Release+Asserts on Linux specifically to speed up the build. As slow as it is to make PDBs with LLD, I promise you dsymutil and gold+objcopy are slower. =S


How do you debug Release builds if you need to? (on Linux let's say) Do you activate debug info only for the TU that needs debugging?

> So, after considering all that, maybe it is best to have MSVC and clang-cl build diverge from the other platforms. If we think making PDBs by default is fast enough, then let's just enable them for all configurations and get rid of MinSizeRel and RelWithDebInfo.

`link.exe` is still slow, especially if `/INCREMENTAL` is disabled. Before going any further on discussing this, I'll do a round of compilation tests to compare with/without MinSizeRel/RelWithDebInfo.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55056/new/

https://reviews.llvm.org/D55056





More information about the llvm-commits mailing list