[Lldb-commits] [lldb] [lldb] add a warning if `dirname` is not in the PATH (PR #164494)

via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 21 13:54:51 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

This patch adds a check in lldb's API test CMakeLists file to ensure that `dirname` is in the PATH, which is not obvious on Windows.

---
Full diff: https://github.com/llvm/llvm-project/pull/164494.diff


1 Files Affected:

- (modified) lldb/test/API/CMakeLists.txt (+9) 


``````````diff
diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index b1ace6296f46a..df2648d3c3518 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -74,6 +74,15 @@ else()
   endif()
 endif()
 
+find_program(LLDB_DIRNAME_PATH dirname)
+if(LLDB_DIRNAME_PATH)
+  message(STATUS "Found dirname: ${LLDB_DIRNAME_PATH}")
+else()
+  message(STATUS "Did not find 'dirname'.")
+  message(WARNING
+        "Many LLDB API tests require the 'dirname' tool. Please provide it in Path.")
+endif()
+
 if (TARGET clang)
   set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}")
 else()

``````````

</details>


https://github.com/llvm/llvm-project/pull/164494


More information about the lldb-commits mailing list