Skip to content

Commit b26f306

Browse files
committed
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.
1 parent 663700c commit b26f306

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mesonbuild/dependencies/python.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,15 @@ def get_windows_link_args(self, limited_api: bool) -> T.Optional[T.List[str]]:
248248
lib = Path(self.variables.get('base_prefix')) / libpath
249249
elif self.platform.startswith('mingw'):
250250
if self.static:
251-
libname = self.variables.get('LIBRARY')
251+
if limited_api:
252+
libname = self.variables.get('ABI3DLLLIBRARY')
253+
else:
254+
libname = self.variables.get('LIBRARY')
252255
else:
253-
libname = self.variables.get('LDLIBRARY')
256+
if limited_api:
257+
libname = self.variables.get('ABI3LDLIBRARY')
258+
else:
259+
libname = self.variables.get('LDLIBRARY')
254260
lib = Path(self.variables.get('LIBDIR')) / libname
255261
else:
256262
raise mesonlib.MesonBugException(

0 commit comments

Comments
 (0)