Skip to content

Commit f9b15a9

Browse files
authored
[cmake] Document and suggest LLVM_ENABLE_PDB (#102887)
As suggested in #101533. @rnk added the flag in b97ff92
1 parent 71d2de8 commit f9b15a9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

llvm/docs/CMake.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ used variables that control features of LLVM and enabled subprojects.
218218
If you are using an IDE such as Visual Studio or Xcode, you should use
219219
the IDE settings to set the build type.
220220

221+
Note: on Windows (building with MSVC or clang-cl), CMake's **RelWithDebInfo**
222+
setting does not enable the same optimizations as **Release**. Using the
223+
**Release** build type with :ref:`LLVM_ENABLE_PDB <llvm_enable_pdb>` set
224+
may be a better option.
225+
221226
**CMAKE_INSTALL_PREFIX**:PATH
222227
Path where LLVM will be installed when the "install" target is built.
223228

@@ -548,6 +553,12 @@ enabled sub-projects. Nearly all of these variable names begin with
548553
Compile with `Clang Header Modules
549554
<https://clang.llvm.org/docs/Modules.html>`_.
550555

556+
.. _llvm_enable_pdb:
557+
558+
**LLVM_ENABLE_PDB**:BOOL
559+
For Windows builds using MSVC or clang-cl, generate PDB files when
560+
:ref:`CMAKE_BUILD_TYPE <cmake_build_type>` is set to Release.
561+
551562
**LLVM_ENABLE_PEDANTIC**:BOOL
552563
Enable pedantic mode. This disables compiler-specific extensions, if
553564
possible. Defaults to ON.

0 commit comments

Comments
 (0)