beeware / Python-Apple-support

A meta-package for building a version of Python that can be embedded into a macOS, iOS, tvOS or watchOS project.
MIT License
1.08k stars 155 forks source link

Add disabling dead code stripping in linker #212

Closed tnymlr closed 3 months ago

tnymlr commented 3 months ago

Mention in the guide that embedding Python requires disabling dead code removal.

When attempting to embed Python as per USAGE.md people end up with non-working solution due to linker removing parts of embedded Python that it found unused. For example, importing base64 fails due to inability to load _PyFloat_Pack4.

PR Checklist: