[LLVMdev] Problems with make
Armin Steinhoff
as at steinhoff-automation.com
Thu Jun 12 05:37:22 PDT 2014
Dan Liew wrote:
>
>
> On 12 Jun 2014 05:31, "pratik dand" <pratikdand143 at gmail.com
> <mailto:pratikdand143 at gmail.com>> wrote:
> >
> > Dear,
> >
> > 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.Â
> >
> > 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?
>
> 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.
>
> If you want things to go faster
>
> * Use the -jN flag with make to build in parallel where N is the
> maximum number of jobs run in parallel. E.g.
>
> $ make -j4
>
This could be critical if you have 4 or less GigaBytes of memory. If you
run "make -j2" it makes sure that no swapping happens ... mostly :)
--Armin
> If that's not fast enough...
>
> * Use the CMake and Ninja as the build system rather than Autoconf/make
>
> $ cmake -G Ninja /path/to/llvm/source
> $ ninja
>
> Ninja runs in parallel by default and is non recursive.
>
> Still not fast enough?
>
> * If linking seems to be a bottleneck consider using the Gold linker
> instead.
>
> Still not fast enough?
>
> * Throw better or more hardware (distcc maybe?) at the problem.
>
> Dan.
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140612/d2583709/attachment.html>
More information about the llvm-dev
mailing list