diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2025-05-01 09:36:39 +0800 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-05-04 17:34:42 -0400 |
| commit | c98cd76956a7ece7f5eea41407651e0af1d37152 (patch) | |
| tree | 27d164fa8b8e17243f5f70022ea788b15ec0dfda /mesonbuild/dependencies/python.py | |
| parent | 2f146775ebc84ea80a80f0583ea85782742fd57f (diff) | |
| download | meson-c98cd76956a7ece7f5eea41407651e0af1d37152.tar.gz | |
Add framework linking for iOS builds.
Diffstat (limited to 'mesonbuild/dependencies/python.py')
| -rw-r--r-- | mesonbuild/dependencies/python.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index 3dab31c12..770203766 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -350,8 +350,14 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase): SystemDependency.__init__(self, name, environment, kwargs) _PythonDependencyBase.__init__(self, installation, kwargs.get('embed', False)) - # match pkg-config behavior - if self.link_libpython: + # For most platforms, match pkg-config behavior. iOS is a special case; + # check for that first, so that check takes priority over + # `link_libpython` (which *shouldn't* be set, but just in case) + if self.platform.startswith('ios-'): + # iOS doesn't use link_libpython - it links with the *framework*. + self.link_args = ['-framework', 'Python', '-F', self.variables.get('prefix')] + self.is_found = True + elif self.link_libpython: # link args if mesonlib.is_windows(): self.find_libpy_windows(environment, limited_api=False) |
