statically link libpython on macOS - #1105
Conversation
statically link python to libpython on macOS Remove patches that disable linking the libraries in statically linked Python stdlib modules to python as these are now needed.
|
Closing + reopening to (hopefully) re-trigger CI |
|
Well this seems fine but now I'm wondering what the linker issue was last time around. Fine with me to merge but I might try to remember what the issue was if I get a chance. |
|
#636 mentions linker errors of: Was this is issue that was refer to in the comment? The first two I did encounter when including Removing the patches added re-introduces |
geofft
left a comment
There was a problem hiding this comment.
That sounds about right and makes sense.
|
I was curious if this change has an effect on performance so I ran fastmark on the 3.13 releases from 20260414 (dynamically linked) and 20260504 (statically linked). The results from averaging 5 runs are: 20260414 (dynamically linked) : 26,485 The difference between these two is not statically significant so it seems that on macOS statically linking makes little difference, although individual benchmarks may see more benefit. Additionally the free-threaded build was not tested which may benefit from TLS when statically linked. |
Statically link
pythontolibpythonon macOS.A dynamic
libpythonis still built and included in the distribution for embedded use.Remove patches that disable linking the libraries in statically linked Python stdlib modules to python as these are now needed.
closes #636