Skip to content

Commit

Permalink
Python: link correct limited API lib on mingw
Browse files Browse the repository at this point in the history
This commit fixes GH issue mesonbuild#13167 by linking to the correct
library under MINGW when the 'limited_api' kwarg is specified.
  • Loading branch information
amcn committed Jun 11, 2024
1 parent fea7f94 commit 328011f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mesonbuild/dependencies/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,15 @@ def get_windows_link_args(self, limited_api: bool) -> T.Optional[T.List[str]]:
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(
Expand Down

0 comments on commit 328011f

Please sign in to comment.