Compiling with g++ using multiple cores

后端 未结 8 2375
猫巷女王i
猫巷女王i 2020-11-29 15:47

Quick question: what is the compiler flag to allow g++ to spawn multiple instances of itself in order to compile large projects quicker (for example 4 source files at a time

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 15:53

    People have mentioned make but bjam also supports a similar concept. Using bjam -jx instructs bjam to build up to x concurrent commands.

    We use the same build scripts on Windows and Linux and using this option halves our build times on both platforms. Nice.

提交回复
热议问题