diff --git a/newsfragments/5605.fixed.md b/newsfragments/5605.fixed.md new file mode 100644 index 00000000000..5ddc7367239 --- /dev/null +++ b/newsfragments/5605.fixed.md @@ -0,0 +1 @@ +iOS extension modules are now linked with the Python framework by default. diff --git a/pyo3-build-config/src/impl_.rs b/pyo3-build-config/src/impl_.rs index d8bbdf4e43c..7cf2d0eb600 100644 --- a/pyo3-build-config/src/impl_.rs +++ b/pyo3-build-config/src/impl_.rs @@ -900,6 +900,7 @@ pub fn is_linking_libpython_for_target(target: &Triple) -> bool { || target.environment == Environment::Android || target.environment == Environment::Androideabi || target.operating_system == OperatingSystem::Cygwin + || matches!(target.operating_system, OperatingSystem::IOS(_)) || !is_extension_module() } @@ -988,6 +989,8 @@ impl CrossCompileConfig { compatible |= matches!(target.operating_system, OperatingSystem::Darwin(_)) && matches!(host.operating_system, OperatingSystem::Darwin(_)); + compatible |= matches!(target.operating_system, OperatingSystem::IOS(_)); + !compatible }