build-llvm: Set more variables for cross compiling LLDB with Python

These are needed with the latest version from git main since
November 2021.
This commit is contained in:
Martin Storsjö committed 2021-11-19 13:12:03 +02:00
1 parent 9eac155de2
commit 6f30aabe97
1 file changed
+7
+7
View File
@@ -164,10 +164,17 @@ if [ -n "$HOST" ]; then
if [ -n "$WITH_PYTHON" ]; then
PYTHON_VER="3.9"
# The python3-config script requires executing with bash. It outputs
# an extra trailing space, which the extra 'echo' layer gets rid of.
EXT_SUFFIX="$(echo $(bash $PREFIX/python/bin/python3-config --extension-suffix))"
CMAKEFLAGS="$CMAKEFLAGS -DLLDB_ENABLE_PYTHON=ON"
CMAKEFLAGS="$CMAKEFLAGS -DPYTHON_HOME=$PREFIX/python"
CMAKEFLAGS="$CMAKEFLAGS -DLLDB_PYTHON_HOME=../python"
# Relative to the lldb install root
CMAKEFLAGS="$CMAKEFLAGS -DLLDB_PYTHON_RELATIVE_PATH=python/lib/python$PYTHON_VER/site-packages"
# Relative to LLDB_PYTHON_HOME
CMAKEFLAGS="$CMAKEFLAGS -DLLDB_PYTHON_EXE_RELATIVE_PATH=bin/python3.exe"
CMAKEFLAGS="$CMAKEFLAGS -DLLDB_PYTHON_EXT_SUFFIX=$EXT_SUFFIX"
CMAKEFLAGS="$CMAKEFLAGS -DPython3_INCLUDE_DIRS=$PREFIX/python/include/python$PYTHON_VER"
CMAKEFLAGS="$CMAKEFLAGS -DPython3_LIBRARIES=$PREFIX/python/lib/libpython$PYTHON_VER.dll.a"