GCC/Make Build Time Optimizations

前端 未结 10 667
鱼传尺愫
鱼传尺愫 2021-02-02 01:22

We have project which uses gcc and make files. Project also contains of one big subproject (SDK) and a lot of relatively small subprojects which use that SDK and some shared fra

10条回答
  •  无人共我
    2021-02-02 01:55

    You can use distcc distributed compiler to reduce the build time if you have access to several machines. Here's an article from from IBM developerWorks related to distcc and how you can use it: http://www.ibm.com/developerworks/linux/library/l-distcc.html

    Another method to reduce build time is to use precompiled headers. Here's a starting point for gcc.

    Also don't forget to use -j when building with make if your machine has more than one cpu/core(2x the number of cores/cpus is just fine).

提交回复
热议问题