diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index fff4aaa9e849..326e605d8543 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -229,7 +229,10 @@ def get_windows_link_args(self, limited_api: bool) -> T.Optional[T.List[str]]: elif imp_lower == 'pypy': libpath = Path(f'libpypy{verdot}-c.dll') else: - libpath = Path(f'python{vernum}.dll') + if self.is_freethreaded: + libpath = Path(f'python{vernum}t.dll') + else: + libpath = Path(f'python{vernum}.dll') else: if self.is_freethreaded: libpath = Path('libs') / f'python{vernum}t.lib'