[PATCH] D77346: [docs] Corrected inaccuracies in Common Problems section

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 17:07:06 PDT 2020


rnk added inline comments.


================
Comment at: llvm/docs/GettingStarted.rst:1108
  * -DLLVM_USE_LINKER
-   Setting this option to either gold or lld will significantly improve
-   performance. In the case that you are compiling lld, you may wish to use the
-   gold linker as a faster alternative.
+   Setting this option to lld will significantly reduce linking time for LLVM 
+   executables. If you are building LLVM for the first time and lld is not 
----------------
It occurs to me that these recommendations are not really applicable on platforms that don't use GNU binutils ld.bfd by default. Despite my comment below, it would make sense to add some kind of "... on platforms that use ELF, such as Linux" into this. =/


================
Comment at: llvm/docs/GettingStarted.rst:1114
  * -DCMAKE_BUILD_TYPE
-   This option defaults to Debug; however, this may consume more memory during
-   the linking phase. So, you may wish to use the build type Release. Another
-   build type you may wish to consider is release-with-asserts which compiles at
-   nearly the same rate as the Release build; however, it may not be as easy
-   to debug. MinSizeRel is another build type you may wish to consider, if you
-   are still having problems with slow build time.
-
- * -DLLVM_PARALLEL_LINK_JOBS
-   Set this equal to number of jobs you wish to run simultaneously. This is
-   similar to the -j option used with make, but only for link jobs. This option
-   is of course only meaningful if you plan to build with ninja. You may wish to
-   use a very low number of jobs, as this will greatly reduce the amount memory
-   used during the build process. If you have limited memory, you may wish to
-   set this to 1.
+   This option defaults to Debug. On Linux, this causes higher memory usage 
+   during the linking phase. So, you may wish to use the Release build type and 
----------------
aprantl wrote:
> On platforms using ELF (such as Linux), this ...
Actually, can I give the opposite feedback? I think adding platform specific admonitions can be confusing. Some day, someone will add an option to run dsymutil as a post-link step on Darwin, and then this statement will be true about Darwin as well as Linux. It is already true for Windows, whether using PDBs or DWARF.

Instead, would it be OK to soften it with `This *can* cause high memory usage during the linking phase.`, so that we can simplify away the condition?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77346





More information about the llvm-commits mailing list