[all-commits] [llvm/llvm-project] 4c2cf3: [lldb] fix -print-script-interpreter-info on windows

smoofra via All-commits all-commits at lists.llvm.org
Tue Nov 16 13:50:41 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c2cf3a314d9131b1b288e7c8ab0c75ac1b2be1d
      https://github.com/llvm/llvm-project/commit/4c2cf3a314d9131b1b288e7c8ab0c75ac1b2be1d
  Author: Lawrence D'Anna <larry at elder-gods.org>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

  Changed paths:
    M lldb/CMakeLists.txt
    A lldb/bindings/python/get-python-config.py
    M lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
    M lldb/test/API/functionalities/paths/TestPaths.py

  Log Message:
  -----------
  [lldb] fix -print-script-interpreter-info on windows

Apparently "{sys.prefix}/bin/python3" isn't where you find the
python interpreter on windows, so the test I wrote for
-print-script-interpreter-info is failing.

We can't rely on sys.executable at runtime, because that will point
to lldb.exe not python.exe.

We can't just record sys.executable from build time, because python
could have been moved to a different location.

But it should be OK to apply relative path from sys.prefix to sys.executable
from build-time to the sys.prefix at runtime.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D113650




More information about the All-commits mailing list