How to speed up g++ compile time (when using a lot of templates)

后端 未结 10 1205
悲&欢浪女
悲&欢浪女 2020-12-22 18:46

This question is perhaps somehow odd, but how can I speed up g++ compile time? My C++ code heavily uses boost and templates. I already moved as much as possible out of the h

10条回答
  •  情歌与酒
    2020-12-22 19:32

    Here's what I've done to speed up builds under a very similar scenario that you describe (boost, templates, gcc)

    • build on local disk instead of a network file system like NFS
    • upgrade to a newer version of gcc
    • investigate distcc
    • faster build systems, especially more RAM

提交回复
热议问题