pybind11/docs
Wenzel Jakob e076c4513d macOS: disable fixup chains when linking extension modules
On macOS, extension library builds usually rely on the flag ``-undefined
dynamic_lookup`` to get the linker to temporarily accept missing CPython
API symbols. As the name implies, those symbols are then dynamically
resolved when Python imports such an extension library. Binaries
produced in this way are more portable since they don't contain a
hardcoded path to the CPython library. This is critical when
distributing binary wheels on PyPI, etc..

When targeting macOS>=12, XCode recently started to generate a somewhat
ominous warning:

``-undefined dynamic_lookup may not work with chained fixups``

For further detail on what chained fixups are, see the following
informative WWDC
https://developer.apple.com/videos/play/wwdc2022/110362/ (the relevant
part starts about 20mins into the video)

The message that the dynamic resolution functionality became broken.
I reported this to Apple via feedback request FB11767124.

Apple investigated the request and updated the behavior of ``ld``
starting with XCode 14.3b1+: it now disables the fixup chain linker
optimization whenever ``-undefined dynamic_lookup`` is specified. The
feedback from Apple also stated that the parameter
``-Wl,-no_fixup_chains`` should be specified on pre-14.3 XCode versions
to ensure correct behavior.

This commit realizes those changes by passing a flag to *always* disable
fixup chains. Related discussion is available in the CPython repository
(https://github.com/python/cpython/issues/97524).
2023-02-27 13:32:16 +01:00
..
_static/css docs: use Furo (#3109) 2022-07-13 10:13:35 -05:00
advanced fix: improve the error reporting for inc_ref GIL failures (#4427) 2022-12-30 13:46:55 -05:00
cmake fix: find_import didn't work properly for classic tools (#2550) 2020-10-05 15:31:00 -04:00
Doxyfile Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (#3688) 2022-02-10 18:28:08 -08:00
Makefile took a stab at some documentation 2015-10-13 03:16:44 +02:00
basics.rst Dropping MSVC 2015 (#3722) 2022-02-14 11:36:22 -08:00
benchmark.py chore: drop Python 3.5 (#3719) 2022-02-11 19:06:16 -05:00
benchmark.rst ci: GHA basic format & pre-commit (#2309) 2020-07-20 13:35:21 -04:00
changelog.rst chore: prepare for 2.10.3 (#4437) 2023-01-03 11:34:22 -05:00
classes.rst [docs] Fix "Enumerations and internal types" example (#4034) 2022-06-28 12:38:37 -07:00
compiling.rst macOS: disable fixup chains when linking extension modules 2023-02-27 13:32:16 +01:00
conf.py chore: move to Ruff and add rules (#4483) 2023-02-22 06:18:55 -08:00
faq.rst Dropping MSVC 2015 (#3722) 2022-02-14 11:36:22 -08:00
index.rst fix: chapters in PDF again (#2606) 2020-10-18 14:31:28 -04:00
installing.rst docs: add a note about compiling the example (#2737) 2020-12-24 09:51:36 -05:00
limitations.rst docs: reduce visibility of 3.9.0 warning (#3105) 2021-07-15 15:01:13 -04:00
pybind11-logo.png docs: use Furo (#3109) 2022-07-13 10:13:35 -05:00
pybind11_vs_boost_python1.png documentation improvements 2016-04-28 15:32:07 +02:00
pybind11_vs_boost_python1.svg Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
pybind11_vs_boost_python2.png documentation improvements 2016-04-28 15:32:07 +02:00
pybind11_vs_boost_python2.svg Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
reference.rst feat: reapply fixed version of #3271 (#3293) 2021-09-23 15:06:07 -04:00
release.rst docs: touch up manual release suggestion (#3422) 2021-11-05 22:48:27 -04:00
requirements.txt docs: use Furo (#3109) 2022-07-13 10:13:35 -05:00
upgrade.rst chore: drop Python 3.5 (#3719) 2022-02-11 19:06:16 -05:00