[Lldb-commits] [lldb] [lldb][windows] fix undeclared identifier error GetModulePath (PR #180989)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 11 10:29:37 PST 2026
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/180989
`LLDB_PYTHON_DLL_RELATIVE_PATH` can be unset while `LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME` is, since it's set automatically by CMake. This situation causes a build failure which this patch fixes.
>From 6e27ef2e467a1ffca0ac00e2022d9211e1689484 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Wed, 11 Feb 2026 19:28:23 +0100
Subject: [PATCH] [lldb][windows] fix undeclared identifier error GetModulePath
---
lldb/source/Host/windows/PythonPathSetup/PythonPathSetup.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/source/Host/windows/PythonPathSetup/PythonPathSetup.cpp b/lldb/source/Host/windows/PythonPathSetup/PythonPathSetup.cpp
index 937977a6851c6..b71e10b9c82e7 100644
--- a/lldb/source/Host/windows/PythonPathSetup/PythonPathSetup.cpp
+++ b/lldb/source/Host/windows/PythonPathSetup/PythonPathSetup.cpp
@@ -19,7 +19,6 @@
using namespace llvm;
-#ifdef LLDB_PYTHON_DLL_RELATIVE_PATH
static std::string GetModulePath(HMODULE module) {
std::vector<WCHAR> buffer(MAX_PATH);
while (buffer.size() <= PATHCCH_MAX_CCH) {
@@ -41,6 +40,7 @@ static std::string GetModulePath(HMODULE module) {
/// Returns the full path to the lldb.exe executable.
static std::string GetPathToExecutable() { return GetModulePath(NULL); }
+#ifdef LLDB_PYTHON_DLL_RELATIVE_PATH
bool AddPythonDLLToSearchPath() {
std::string path_str = GetPathToExecutable();
if (path_str.empty())
More information about the lldb-commits
mailing list