================ @@ -0,0 +1,22 @@ +//===-- PythonPathSetup.h -------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SOURCE_UTILITY_PYTHONPATHSETUP_H +#define LLDB_SOURCE_UTILITY_PYTHONPATHSETUP_H + +/// Try to setup the DLL search path for the Python Runtime Library +/// (python3xx.dll). +/// +/// If `LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME` is set, we first check if +/// python3xx.dll is in the search path. If it's not, we try to add it and +/// check for it a second time. +/// If only `LLDB_PYTHON_DLL_RELATIVE_PATH` is set, we try to add python3xx.dll +/// to the search path python.dll is already in the search path or not. ---------------- DavidSpickett wrote:
I don't have a great suggestion to reword all this, but I feel like some context is missing, or it needs to expand to essentially be a flowchart. For instance: > If `LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME` is set Ok, then: > If only `LLDB_PYTHON_DLL_RELATIVE_PATH` You're describing N of (N+?) combinations of these, so the word "only" makes it sound like there should have been a "if this and that are defined". * LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME only * LLDB_PYTHON_DLL_RELATIVE_PATH only * LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME and LLDB_PYTHON_DLL_RELATIVE_PATH * Nothing set (maybe not allowed by cmake) Perhaps it is like: * If we have LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME, it is used first. * If that didn't find the DLL then we look at LLDB_PYTHON_DLL_RELATIVE_PATH (which may or may not look at LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME too, to append to the path?) Also if you're having to duplicate all this in the cpp file, I think it would be ok to say here "the behaviour of this function is documented in the implementation due to its complexity". Yes that wouldn't be in convenient public documentation but the sources are on github for anyone to see. https://github.com/llvm/llvm-project/pull/179306 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
