[PATCH] D75425: [docs] Added solutions to slow build under common problems

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 1 12:22:48 PST 2020


abrachet added a comment.

Thanks for this! I was thinking about adding this as well because we get failed build emails to the list all the time.

We could recommend using `-DLLVM_ENABLE_LLD=ON` or gold if they don't have lld. Also `-DBUILD_SHARED_LIBS=ON` should help with memory a lot too.

Some people try to compile with very little memory, and that's what ultimately kills these builds. I think we should mention that there is a theoretical limit to how small of a memory footprint we can create with these options and sometimes they will be forced to increase their swap space, if their physical memory is just too small.



================
Comment at: llvm/docs/GettingStarted.rst:1104
+ * -DCMAKE_BUILD_TYPE  
+   Set this equal to the build you wish to use, either Debug or Release. The 
+   Debug build may consume more memory during the linking phase.
----------------
We could add that if you need a Debug build, you could consider using `-DLLVM_USE_SPLIT_DWARF=ON` which should ease memory pressure on the linker significantly.


================
Comment at: llvm/docs/GettingStarted.rst:1107
+
+ * -DLLVM_PARALLEL_LINK_JOBS  
+   Set this equal to number of jobs you wish to run simultaneously. This is 
----------------
lebedev.ri wrote:
> Should mention that this is ninja specific.
> And i think `similar to the -j option used with make.` is missing words "but for link jobs only"
We could also mention `PARALLEL_COMPILE_JOBS` but it's impact is much less significant.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75425/new/

https://reviews.llvm.org/D75425





More information about the llvm-commits mailing list