[llvm] [cmake] Document and suggest LLVM_ENABLE_PDB (PR #102887)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 05:12:23 PDT 2024
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/102887
>From 021edd228118403ed1d7f1aea3e25e18440ddf90 Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans at chromium.org>
Date: Mon, 12 Aug 2024 14:06:32 +0200
Subject: [PATCH 1/2] [cmake] Document and suggest LLVM_ENABLE_PDB
---
llvm/docs/CMake.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 2a80813999ea1e..f4fe0952ac7dbb 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -218,6 +218,11 @@ used variables that control features of LLVM and enabled subprojects.
If you are using an IDE such as Visual Studio or Xcode, you should use
the IDE settings to set the build type.
+ Note: on Windows (building with MSVC or clang-cl), CMake's **RelWithDebInfo**
+ setting does not enable the same optimizations as **Release**. Using the
+ **Release** build type with :ref:`LLVM_ENABLE_PDB <llvm_enable_pdb>` set
+ may be a better option.
+
**CMAKE_INSTALL_PREFIX**:PATH
Path where LLVM will be installed when the "install" target is built.
@@ -548,6 +553,12 @@ enabled sub-projects. Nearly all of these variable names begin with
Compile with `Clang Header Modules
<https://clang.llvm.org/docs/Modules.html>`_.
+.. _llvm_enable_pdb:
+
+**LLVM_ENABLE_PDB**:BOOL
+ For Windows builds using MSVC or clang-cl, generate PDB files regardless of
+ CMAKE_BUILD_TYPE.
+
**LLVM_ENABLE_PEDANTIC**:BOOL
Enable pedantic mode. This disables compiler-specific extensions, if
possible. Defaults to ON.
>From 3cf37347f4aefb14728b4d61b16924bab17f6118 Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans at chromium.org>
Date: Mon, 12 Aug 2024 14:12:02 +0200
Subject: [PATCH 2/2] word tweaks
---
llvm/docs/CMake.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index f4fe0952ac7dbb..838447f483e510 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -556,8 +556,8 @@ enabled sub-projects. Nearly all of these variable names begin with
.. _llvm_enable_pdb:
**LLVM_ENABLE_PDB**:BOOL
- For Windows builds using MSVC or clang-cl, generate PDB files regardless of
- CMAKE_BUILD_TYPE.
+ For Windows builds using MSVC or clang-cl, generate PDB files when
+ :ref:`CMAKE_BUILD_TYPE <cmake_build_type>` is set to Release.
**LLVM_ENABLE_PEDANTIC**:BOOL
Enable pedantic mode. This disables compiler-specific extensions, if
More information about the llvm-commits
mailing list