[Lldb-commits] [PATCH] D88840: [dotest] Simplify logic to find the Python path
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 6 11:09:33 PDT 2020
JDevlieghere added a comment.
In D88840#2314883 <https://reviews.llvm.org/D88840#2314883>, @labath wrote:
> In D88840#2314860 <https://reviews.llvm.org/D88840#2314860>, @JDevlieghere wrote:
>
>> In D88840#2314594 <https://reviews.llvm.org/D88840#2314594>, @labath wrote:
>>
>>> One way this could be simplified further is to ditch `-P` and pass down the appropriate value from cmake/lit.
>>
>> LLDB in Xcode supports both Python 2 and 3 and we use a default `com.apple.dt.lldb DefaultPythonVersion` to override the version. By using `-P` here we can run the test suite with both versions by just changing the value of the default without having to reconfigure CMake. I'm not saying we should not do this because our donwstream fork, just that it would complicate things for us.
>
> Yea, I'm not volunteering to do that (though I might one day), but... doesn't the python version that lldb uses and the python version running dotest needs to match? I'd expect that you'd still need to change /something/ so that it runs the different version of the python interpreter...
Yep, we have a little snippet that checks the default in `lit.cfg.py` that swaps out the configured Python interpreter with the system one matching the default when set, similar to our little hack for running Python under ASan: https://github.com/llvm/llvm-project/blob/a3adcba645eec31b42ad0a1f727975c5c9c236f0/lldb/test/API/lit.cfg.py#L117
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88840/new/
https://reviews.llvm.org/D88840
More information about the lldb-commits
mailing list