[PATCH] D124367: [docs] Improve documentation around CMAKE_BUILD_TYPE

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 01:45:33 PDT 2022


jhenderson added inline comments.


================
Comment at: llvm/docs/CMake.rst:209
+
+  * Optimizations makes LLVM/Clang run faster, but can be an
+    impediment for step-by-step debugging.
----------------



================
Comment at: llvm/docs/CMake.rst:211-212
+    impediment for step-by-step debugging.
+  * Builds with debug information can use a lot of RAM and lot of
+    disk space and is usually slower to run. You can improve
+    RAM usage by using ``lld``, see the :ref:`LLVM_USE_LINKER <llvm_use_linker>`
----------------
"can use a lot of RAM and disk space and are usually"


================
Comment at: llvm/docs/CMake.rst:215-216
+    option.
+  * Assertions are internal checks to help you find bugs. They
+    typically slow down LLVM and Clang when enabled, but can be useful
+    during development. You can manually set :ref:`LLVM_ENABLE_ASSERTIONS <llvm_enable_assertions>`
----------------
Nit: possibly wrapped a bit prematurely?


================
Comment at: llvm/docs/GettingStarted.rst:1191-1192
  * -DCMAKE_BUILD_TYPE
-
-    - Debug --- This is the default build type. This disables optimizations while
-      compiling LLVM and enables debug info. On ELF-based platforms (e.g. Linux)
-      linking with debug info may consume a large amount of memory.
-
-    - Release --- Turns on optimizations and disables debug info. Combining the
-      Release build type with -DLLVM_ENABLE_ASSERTIONS=ON may be a good trade-off
-      between speed and debugability during development, particularly for running
-      the test suite.
+   The default ``CMAKE_BUILD_TYPE`` is ``Debug`` that is well suited to people
+   that develop LLVM, but will use more disk space and more RAM when linking.
+   If you only plan to use LLVM or Clang it's better to set this to ``Release``.
----------------
This paragraph seems to be a match for the earlier one under "common cmake options". If you feel it should be duplicated, please update it to fix the same grammar issues.

(i.e. "that" -> "which")


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124367



More information about the llvm-commits mailing list