How to speed up c++ linking time

后端 未结 4 764
自闭症患者
自闭症患者 2021-02-04 05:17

Is there any way, to optimalize linking time in MS Visual studio C++ (2005) ? We\'re using Xoreax Incredibuild for compilation speed up, but nothing for link.

Currently

4条回答
  •  自闭症患者
    2021-02-04 05:37

    If you can live without the optimization, turn off link-time code generation (remove the /GL switch or in properties c/c++ -> Optimization -> Whole Program Optimization. For the linker remove /ltcg or use the Link Time Code Generation Setting). This will make the compiler slower though, as code generation now happens during compile time.

    I've seen projects that take hours to build with /GL+/LTCG, mere seconds without (this one for example: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/750ed2b0-0d51-48a3-bd9a-e8f4b544ded8)

提交回复
热议问题