[llvm-dev] System hangs during last stages of LLVM build | Tips on speeding it up ?
SANJAY SRIVALLABH SINGAPURAM via llvm-dev
llvm-dev at lists.llvm.org
Thu Feb 23 10:16:54 PST 2017
Thanks for the tips !
On Thu, Feb 23, 2017 at 11:15 PM Tim Northover <t.p.northover at gmail.com>
> Hi Sanjay,
> On 23 February 2017 at 09:21, SANJAY SRIVALLABH SINGAPURAM via
> llvm-dev <llvm-dev at lists.llvm.org> wrote:
> > My system hangs every time during last stages of building LLVM (
> starting at
> > 95% in a CMake build ) using CMake or Ninja, sometime close to the
> > of llvm-dysmutil. Could you please suggest tips that could speed up the
> > compilation ?
> This is probably because multiple linker processes are using all your
> memory and bogging down in swap. There are various things you can do
> to improve performance:
> * There's an LLVM_PARALLEL_LINK_JOBS option which you can use to
> reduce the number of ld instances running at once (you'll need to be
> using Ninja rather than Make for this to work, but that's faster
> anyway). This is a slightly more fine-grained approach than Tobias's
> "-j 1"; systems can usually support more compile jobs than link.
> * If on Linux, you can switch to ld.gold (or lld if you're feeling
> brave!), which is much faster than the default ld.bfd
Would complications arise because of a *cyclic dependency*, using lld to
build (a newer) lld, and possibly changing the lld binary while it's being
used to link other files ?
> * Also on ELF platforms, there's LLVM_USE_SPLIT_DWARF which separates
> the debug info into a different file. This really speeds things up,
> but you need a recent(ish) gdb to be able to debug the result.
> Those are the obvious ways to reduce memory. You might also consider
> only building the targets you need, which will speed things up but not
> get around swapping usually.
This is my experience after targeting only X86 and NVPTX !! 😆
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev