[Lldb-commits] [lldb] [LLDB] Require DIA SDK for testing the PDB plugin-selection setting (PR #158284)

via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 12 07:12:43 PDT 2025


https://github.com/Nerixyz updated https://github.com/llvm/llvm-project/pull/158284

>From 9990fae1d43641a1868e3df641f346873ce8f78e Mon Sep 17 00:00:00 2001
From: Nerixyz <nerixdev at outlook.de>
Date: Fri, 12 Sep 2025 14:08:33 +0200
Subject: [PATCH 1/2] [LLDB] Require DIA SDK for testing the PDB plugin
 selection setting

---
 lldb/test/Shell/SymbolFile/PDB/native-setting.cpp | 2 +-
 lldb/test/Shell/lit.cfg.py                        | 3 +++
 lldb/test/Shell/lit.site.cfg.py.in                | 3 +++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lldb/test/Shell/SymbolFile/PDB/native-setting.cpp b/lldb/test/Shell/SymbolFile/PDB/native-setting.cpp
index ce188e75553c7..edf7508b88f17 100644
--- a/lldb/test/Shell/SymbolFile/PDB/native-setting.cpp
+++ b/lldb/test/Shell/SymbolFile/PDB/native-setting.cpp
@@ -1,4 +1,4 @@
-// REQUIRES: target-windows
+// REQUIRES: diasdk
 
 // Test plugin.symbol-file.pdb.reader setting
 // RUN: %build -o %t.exe -- %s
diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index 46e2117cdb8e7..505847fb763e0 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -170,6 +170,9 @@ def calculate_arch_features(arch_string):
             )
         )
 
+if config.have_dia_sdk:
+    config.available_features.add("diasdk")
+
 # NetBSD permits setting dbregs either if one is root
 # or if user_set_dbregs is enabled
 can_set_dbregs = True
diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in
index beaa41e6fd379..859a064d636ae 100644
--- a/lldb/test/Shell/lit.site.cfg.py.in
+++ b/lldb/test/Shell/lit.site.cfg.py.in
@@ -1,5 +1,7 @@
 @LIT_SITE_CFG_IN_HEADER@
 
+import lit.util
+
 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
 config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
@@ -34,6 +36,7 @@ config.have_lldb_server = @LLDB_TOOL_LLDB_SERVER_BUILD@
 config.lldb_system_debugserver = @LLDB_USE_SYSTEM_DEBUGSERVER@
 config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
 config.lldb_has_lldbrpc = @LLDB_BUILD_LLDBRPC@
+config.have_dia_sdk = lit.util.pythonize_bool("@LLVM_ENABLE_DIA_SDK@")
 # The shell tests use their own module caches.
 config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell")
 config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-shell")

>From efdc08b13f0f73dee50398a14d6f674f2e8ebcf5 Mon Sep 17 00:00:00 2001
From: Nerixyz <nerixdev at outlook.de>
Date: Fri, 12 Sep 2025 16:12:29 +0200
Subject: [PATCH 2/2] fix: canonicalize boolean in CMake

---
 lldb/test/CMakeLists.txt           | 1 +
 lldb/test/Shell/lit.site.cfg.py.in | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 39462560c4b98..8116f4c3c823a 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -250,6 +250,7 @@ llvm_canonicalize_cmake_booleans(
   LLDB_ENABLE_LZMA
   LLVM_ENABLE_ZLIB
   LLVM_ENABLE_SHARED_LIBS
+  LLVM_ENABLE_DIA_SDK
   LLDB_HAS_LIBCXX
   LLDB_TEST_SHELL_DISABLE_REMOTE
   LLDB_TOOL_LLDB_SERVER_BUILD
diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in
index 859a064d636ae..47beac002a19c 100644
--- a/lldb/test/Shell/lit.site.cfg.py.in
+++ b/lldb/test/Shell/lit.site.cfg.py.in
@@ -1,7 +1,5 @@
 @LIT_SITE_CFG_IN_HEADER@
 
-import lit.util
-
 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
 config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
@@ -36,7 +34,7 @@ config.have_lldb_server = @LLDB_TOOL_LLDB_SERVER_BUILD@
 config.lldb_system_debugserver = @LLDB_USE_SYSTEM_DEBUGSERVER@
 config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
 config.lldb_has_lldbrpc = @LLDB_BUILD_LLDBRPC@
-config.have_dia_sdk = lit.util.pythonize_bool("@LLVM_ENABLE_DIA_SDK@")
+config.have_dia_sdk = @LLVM_ENABLE_DIA_SDK@
 # The shell tests use their own module caches.
 config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell")
 config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-shell")



More information about the lldb-commits mailing list