From cb52ece4112f72591a37f8f3b7cd79a63a0d2c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 30 Jan 2024 13:31:29 +0200 Subject: [PATCH] build-llvm: Fix the selection of python import library Since cpython-mingw v3.11 (see cpython-mingw commit 8aeb46d09c068a1228e83b29101c17bf1ff0612a), the versionless, stable ABI libpython3.dll gets installed, along with libpython3.dll.a. Ideally we would use this, which gets us better flexibility, but in practice, LLDB fails to link against this, as it doesn't expose enough of the symbols we use and need. Previously, we ended up with PYTHON_LIB containing two path names, which caused CMake to print warnings about ignoring extra paths on the command line. This fixes issue #396. --- build-llvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-llvm.sh b/build-llvm.sh index c4502c8..9de93ca 100755 --- a/build-llvm.sh +++ b/build-llvm.sh @@ -204,7 +204,7 @@ if [ -n "$HOST" ]; then EXT_SUFFIX="$(echo $(bash $PREFIX/python/bin/python3-config --extension-suffix))" PYTHON_RELATIVE_PATH="$(cd "$PREFIX" && echo python/lib/python*/site-packages)" PYTHON_INCLUDE_DIR="$(echo $PREFIX/python/include/python*)" - PYTHON_LIB="$(echo $PREFIX/python/lib/libpython*.dll.a)" + PYTHON_LIB="$(echo $PREFIX/python/lib/libpython3.*.dll.a)" CMAKEFLAGS="$CMAKEFLAGS -DLLDB_ENABLE_PYTHON=ON" CMAKEFLAGS="$CMAKEFLAGS -DPYTHON_HOME=$PREFIX/python" CMAKEFLAGS="$CMAKEFLAGS -DLLDB_PYTHON_HOME=../python"