aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McNulty <amcn102@gmail.com>2024-05-08 19:05:47 +0200
committerAndrew McNulty <amcn102@gmail.com>2024-06-11 19:47:31 +0200
commit328011f77a1cef00655a697cd2e503a97754b745 (patch)
tree3ec538ba4005b2b2355030e6c31e16bf1f0a44f8
parentfea7f94b6796e4ad296989c040d45ae3b4c3f444 (diff)
downloadmeson-328011f77a1cef00655a697cd2e503a97754b745.zip
meson-328011f77a1cef00655a697cd2e503a97754b745.tar.gz
meson-328011f77a1cef00655a697cd2e503a97754b745.tar.bz2
Python: link correct limited API lib on mingw
This commit fixes GH issue #13167 by linking to the correct library under MINGW when the 'limited_api' kwarg is specified.
-rw-r--r--mesonbuild/dependencies/python.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
index 56dddd9..a74423c 100644
--- a/mesonbuild/dependencies/python.py
+++ b/mesonbuild/dependencies/python.py
@@ -248,9 +248,15 @@ class _PythonDependencyBase(_Base):
lib = Path(self.variables.get('base_prefix')) / libpath
elif self.platform.startswith('mingw'):
if self.static:
- libname = self.variables.get('LIBRARY')
+ if limited_api:
+ libname = self.variables.get('ABI3DLLLIBRARY')
+ else:
+ libname = self.variables.get('LIBRARY')
else:
- libname = self.variables.get('LDLIBRARY')
+ if limited_api:
+ libname = self.variables.get('ABI3LDLIBRARY')
+ else:
+ libname = self.variables.get('LDLIBRARY')
lib = Path(self.variables.get('LIBDIR')) / libname
else:
raise mesonlib.MesonBugException(