Possible to stop generating *.ipdb *.iobj files by VIsual Studio 2015?

主宰稳场 提交于 2019-12-31 17:54:13

问题


In Visual Studio Community 2015, a Visual C++ project generates a *.ipdb file and a *.iobj file in its Release folder.

Now in Visual Studio Community 2013, I've never seen these files generated in project Release folder and so I'd like to know -

Is it possible to stop generating them?


回答1:


These files are produced when Incremental Link-Time Code Generation (LTCG) is enabled. This is a new feature in Visual C++ 2015.

If you disable Incremental LTCG, the linker will stop producing these files. But then you lose the benefits of Incremental LTCG.

To disable Incremental LTCG, modify your project properties: Under Linker => Optimization change "Link Time Code Generation" to something other than "Use Fast Link Time Code Generation (/LTCG:incremental)" (this is the default for Release builds).




回答2:


I believe it allow you to generate the project faster, when it prints that kind of message in the console:

2 of 3 functions (66.7%) were compiled, the rest were copied from previous compilation.
1>    2 functions were new in current compilation
1>    0 functions had inline decision re-evaluated but remain unchanged
1>  Finished generating code

I don't think you can remove it, but it is an useful tool This is because the PDB generation takes a large portion of the compilation time. You can consider it as "precompiled sources" I believe.




回答3:


You don't need to disable incremental linking. Since VS 2015 default under Linker/Optimization for Release build is "Fast Link Time Code Generation" (/LTCG:incremental). You just need to change it to "Link Time Code Generation" (/LTCG) and you will have incremental linking and VS will stop producing *.iobj and *ipdb files.



来源:https://stackoverflow.com/questions/31554559/possible-to-stop-generating-ipdb-iobj-files-by-visual-studio-2015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!