Allow customized relative PYTHONHOME
authorHaibo Huang <hhb@google.com>
Mon, 17 Feb 2020 01:33:32 +0000 (17:33 -0800)
committerHaibo Huang <hhb@google.com>
Fri, 21 Feb 2020 20:49:10 +0000 (12:49 -0800)
commit0bb90628b5f7c170689d2d3f019af773772fc649
tree17720cab2b12899850c0b06de72bcd49b320b8bf
parent1874dee5662603c9251228c71b66de72cec0c979
Allow customized relative PYTHONHOME

Summary:
This change allows a hard coded relative PYTHONHOME setting. So that
python can easily be packaged together with lldb.

The change includes:
1. Extend LLDB_RELOCATABLE_PYTHON to all platforms. It defaults to ON
for platforms other than Windows, to keep the behavior compatible.
2. Allows to customize LLDB_PYTHON_HOME. But still defaults to
PYTHON_HOME.
3. LLDB_PYTHON_HOME can be a path relative to liblldb. If it is
relative, we will resolve it before send it to Py_DecodeLocale.

Subscribers: mgorny, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D74727
lldb/cmake/modules/LLDBConfig.cmake
lldb/include/lldb/Host/Config.h.cmake
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp