@@ -1085,67 +1085,89 @@ general questions about LLVM, please consult the `Frequently Asked
1085
1085
Questions <FAQ.html> `_ page.
1086
1086
1087
1087
If you are having problems with limited memory and build time, please try
1088
- building with ninja instead of make. Please consider configuring the
1088
+ building with `` ninja `` instead of `` make `` . Please consider configuring the
1089
1089
following options with cmake:
1090
1090
1091
- * -G Ninja
1091
+ * ``-G Ninja ``
1092
+
1092
1093
Setting this option will allow you to build with ninja instead of make.
1093
1094
Building with ninja significantly improves your build time, especially with
1094
1095
incremental builds, and improves your memory usage.
1095
1096
1096
- * -DLLVM_USE_LINKER
1097
- Setting this option to lld will significantly reduce linking time for LLVM
1098
- executables on ELF-based platforms, such as Linux. If you are building LLVM
1097
+ * ``-DLLVM_USE_LINKER ``
1098
+
1099
+ Setting this option to ``lld `` will significantly reduce linking time for LLVM
1100
+ executables, particularly on Linux and Windows. If you are building LLVM
1099
1101
for the first time and lld is not available to you as a binary package, then
1100
1102
you may want to use the gold linker as a faster alternative to GNU ld.
1101
1103
1102
- * -DCMAKE_BUILD_TYPE
1104
+ * ``-DCMAKE_BUILD_TYPE ``
1105
+
1103
1106
Controls optimization level and debug information of the build. This setting
1104
1107
can affect RAM and disk usage, see :ref: `CMAKE_BUILD_TYPE <cmake_build_type >`
1105
1108
for more information.
1106
1109
1107
- * -DLLVM_ENABLE_ASSERTIONS
1108
- This option defaults to ON for Debug builds and defaults to OFF for Release
1110
+ * ``-DLLVM_ENABLE_ASSERTIONS ``
1111
+
1112
+ This option defaults to ``ON `` for Debug builds and defaults to ``OFF `` for Release
1109
1113
builds. As mentioned in the previous option, using the Release build type and
1110
1114
enabling assertions may be a good alternative to using the Debug build type.
1111
1115
1112
- * -DLLVM_PARALLEL_LINK_JOBS
1116
+ * ``-DLLVM_PARALLEL_LINK_JOBS ``
1117
+
1113
1118
Set this equal to number of jobs you wish to run simultaneously. This is
1114
- similar to the -j option used with make, but only for link jobs. This option
1119
+ similar to the `` -j `` option used with `` make `` , but only for link jobs. This option
1115
1120
can only be used with ninja. You may wish to use a very low number of jobs,
1116
1121
as this will greatly reduce the amount of memory used during the build
1117
- process. If you have limited memory, you may wish to set this to 1.
1122
+ process. If you have limited memory, you may wish to set this to ``1 ``.
1123
+
1124
+ * ``-DLLVM_TARGETS_TO_BUILD ``
1118
1125
1119
- * -DLLVM_TARGETS_TO_BUILD
1120
1126
Set this equal to the target you wish to build. You may wish to set this to
1121
- X86; however, you will find a full list of targets within the
1122
- llvm-project/llvm/lib/Target directory.
1127
+ only your host architecture. For example ``X86 `` if you are using an Intel or
1128
+ AMD machine. You will find a full list of targets within the
1129
+ `llvm-project/llvm/lib/Target <https://github.com/llvm/llvm-project/tree/main/llvm/lib/Target >`_
1130
+ directory.
1131
+
1132
+ * ``-DLLVM_OPTIMIZED_TABLEGEN ``
1123
1133
1124
- * -DLLVM_OPTIMIZED_TABLEGEN
1125
- Set this to ON to generate a fully optimized tablegen during your build. This
1126
- will significantly improve your build time. This is only useful if you are
1127
- using the Debug build type .
1134
+ Set this to `` ON `` to generate a fully optimized TableGen compiler during your
1135
+ build, even if that build is a `` Debug `` build. This will significantly improve
1136
+ your build time. You should not enable this if your intention is to debug the
1137
+ TableGen compiler .
1128
1138
1129
- * -DLLVM_ENABLE_PROJECTS
1130
- Set this equal to the projects you wish to compile (e.g. clang, lld, etc.) If
1139
+ * ``-DLLVM_ENABLE_PROJECTS ``
1140
+
1141
+ Set this equal to the projects you wish to compile (e.g. ``clang ``, ``lld ``, etc.) If
1131
1142
compiling more than one project, separate the items with a semicolon. Should
1132
1143
you run into issues with the semicolon, try surrounding it with single quotes.
1133
1144
1134
- * -DLLVM_ENABLE_RUNTIMES
1135
- Set this equal to the runtimes you wish to compile (e.g. libcxx, libcxxabi, etc.)
1145
+ * ``-DLLVM_ENABLE_RUNTIMES ``
1146
+
1147
+ Set this equal to the runtimes you wish to compile (e.g. ``libcxx ``, ``libcxxabi ``, etc.)
1136
1148
If compiling more than one runtime, separate the items with a semicolon. Should
1137
1149
you run into issues with the semicolon, try surrounding it with single quotes.
1138
1150
1139
- * -DCLANG_ENABLE_STATIC_ANALYZER
1140
- Set this option to OFF if you do not require the clang static analyzer. This
1151
+ * ``-DCLANG_ENABLE_STATIC_ANALYZER ``
1152
+
1153
+ Set this option to ``OFF `` if you do not require the clang static analyzer. This
1141
1154
should improve your build time slightly.
1142
1155
1143
- * -DLLVM_USE_SPLIT_DWARF
1144
- Consider setting this to ON if you require a debug build, as this will ease
1156
+ * ``-DLLVM_USE_SPLIT_DWARF ``
1157
+
1158
+ Consider setting this to ``ON `` if you require a debug build, as this will ease
1145
1159
memory pressure on the linker. This will make linking much faster, as the
1146
- binaries will not contain any of the debug information; however, this will
1147
- generate the debug information in the form of a DWARF object file (with the
1148
- extension .dwo). This only applies to host platforms using ELF, such as Linux.
1160
+ binaries will not contain any of the debug information. Instead the debug
1161
+ information is in a separate DWARF object file (with the extension ``.dwo ``).
1162
+ This only applies to host platforms using ELF, such as Linux.
1163
+
1164
+ * ``-DBUILD_SHARED_LIBS ``
1165
+
1166
+ Setting this to ``ON `` will build shared libraries instead of static
1167
+ libraries. This will ease memory pressure on the linker. However, this should
1168
+ only be used when developing llvm. See
1169
+ :ref: `BUILD_SHARED_LIBS <LLVM-related variables BUILD_SHARED_LIBS >`
1170
+ for more information.
1149
1171
1150
1172
.. _links :
1151
1173
0 commit comments