Skip to content

Enable optimizations in Python build and set exec_prefix

Matthew Feickert requested to merge revise/update-cpython-build-options into master

Turn on build optimizations with --enable-optimizations and --with-lto which enables Profile guided optimization (PGO) and Link Time Optimization (LTO). Both are needed, despite what some documentation might state.

https://stackoverflow.com/questions/41405728/what-does-enable-optimizations-do-while-compiling-python

Additionally, explicitly set the exec_prefix to be the same as prefix

https://docs.python.org/3/using/unix.html#python-related-paths-and-files

Merge request reports