Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tips to make builds faster

Is there any way to make software builds / compilation faster ? We have a build tree c, c++ using makefile that takes close to 2Hrs for fresh builds. I came across few commercial solutions like ElectricAccelerator, Sparkbuild, are there any opensource equivalent ?

like image 399
Kamath Avatar asked Jan 18 '12 15:01

Kamath


2 Answers

In our company we had lots of product that has longer build time like 3-6 hours.

There are 2 techniques we used.

  1. Use parallel build by -j option of make
  2. Mount RAM as a disk. Then move all the files there and compile. But you need plenty of RAM for it. We used Amazons ec2 instances. It was quite expensive.
like image 176
Shiplu Mokaddim Avatar answered Oct 15 '22 11:10

Shiplu Mokaddim


You may want to look at distcc, ccache and, of course, -j make option.

like image 44
Michael Krelin - hacker Avatar answered Oct 15 '22 10:10

Michael Krelin - hacker