Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions mesonbuild/dependencies/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,16 @@ def get_windows_link_args(self, limited_api: bool) -> T.Optional[T.List[str]]:
else:
libpath = Path(f'python{vernum}.dll')
else:
if self.is_freethreaded:
libpath = Path('libs') / f'python{vernum}t.lib'
library = self.variables.get('LIBRARY', '')
base_name, ext = os.path.splitext(library)
if ext.lower() == '.dll':
libpath = Path('libs') / f'{base_name}.lib'
else:
libpath = Path('libs') / f'python{vernum}.lib'
if self.is_freethreaded:
libpath = Path('libs') / f'python{vernum}t.lib'
else:
libpath = Path('libs') / f'python{vernum}.lib'
mlog.debug("Using python static library: {!r}".format(str(libpath)))
# For a debug build, pyconfig.h may force linking with
# pythonX_d.lib (see meson#10776). This cannot be avoided
# and won't work unless we also have a debug build of
Expand Down