[Lldb-commits] [PATCH] D64821: [CMake] Remove duplicated logic to find Python when doing a standalone build
Stefan Gränitz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 17 02:59:39 PDT 2019
sgraenitz added a comment.
> I'm pretty sure there's no need to have this logic living in LLDBStandalone. We always go through LLDBConfig.cmake which has the canonical way to find the Python libs and interpreter.
LLDBStandalone is supposed to act like a polyfill for whatever LLVM would usually do, so LLDBConfig (and ideally everything else) can ignore in-tree vs. standalone. Thus, the Python logic here should always behave like its LLVM counterpart. If it turns out to be incorrect, we should either adapt LLDBConfig or change both LLVM and LLDBStandalone.
> Indeed, the culprit appears to be https://github.com/llvm/llvm-project/blob/master/llvm/CMakeLists.txt#L645, which prefer Python 3 over Python 2.
This changed quite recently https://reviews.llvm.org/D64443
Comment at: lldb/cmake/modules/LLDBStandalone.cmake:101
The actual difference to https://github.com/llvm/llvm-project/blob/c23bc97e85f6/llvm/CMakeLists.txt#L645 is the condition on `PYTHON_EXECUTABLE`.
CHANGES SINCE LAST ACTION
More information about the lldb-commits