<p dir="ltr"><br>
On 12 Jun 2014 05:31, "pratik dand" <<a href="mailto:pratikdand143@gmail.com">pratikdand143@gmail.com</a>> wrote:<br>
><br>
> Dear,<br>
><br>
> I am currently working on one specific architecture. When I make changes and try to "make" it takes a very long time as It compiles all the files in the source. <br>
><br>
> My question is since I am only editing a few files in the architecture directory and some files in include directory, Can I speed up my "make" by running "make" only for a few files?</p>
<p dir="ltr">There is a way but DO NOT DO THIS! If make is rebuilding a lot of files then it is very likely it is necessary for them to be rebuilt and trying to circumvent this will lead to confusing problems.</p>
<p dir="ltr">If you want things to go faster</p>
<p dir="ltr">* Use the -jN flag with make to build in parallel where N is the maximum number of jobs run in parallel. E.g.</p>
<p dir="ltr">$ make -j4</p>
<p dir="ltr">If that's not fast enough...</p>
<p dir="ltr">* Use the CMake and Ninja as the build system rather than Autoconf/make</p>
<p dir="ltr">$ cmake -G Ninja /path/to/llvm/source<br>
$ ninja</p>
<p dir="ltr">Ninja runs in parallel by default and is non recursive.</p>
<p dir="ltr">Still not fast enough?</p>
<p dir="ltr">* If linking seems to be a bottleneck consider using the Gold linker instead.</p>
<p dir="ltr">Still not fast enough? </p>
<p dir="ltr">* Throw better or more hardware (distcc maybe?) at the problem.</p>
<p dir="ltr">Dan.<br>
</p>