1 year ago

#299447

test-img

kitten_woof

Ninja and PDB file size

I am building software for Windows using MSVC compiler. CMake is used as a project generator that supports two types of build Visual Studio and Ninja. It is a quite large and proprietary project thus I cannot share many details.

The problem is a difference in .pdb debugging symbols files that are generated as a result of this build. When Visual Studio generator is used the resulted .pdb file is 2.5GB When Ninja generator is used the file is whooping 4.2GB and sometimes goes 5+GB Since the limit for the possible .pdb files size is 4GB according to my research, linking of the target when using Ninja is failing.

There is a possible workaround exist: https://developercommunity.visualstudio.com/t/pdb-limit-of-4-gib-is-likely-to-be-a-problem-in-a/904784

However, this is just patching the problem and not really solving it. The question is why Ninja all of a sudden generates such enormous PDB file sizes? Is there a way to prevent this? What would be the root cause for this?

c++

visual-studio

cmake

ninja

pdb-files

0 Answers

Your Answer

Accepted video resources