This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: [macOS] Use --enable-optimizations in
Type: enhancement Stage: resolved
Components: macOS Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: 41100 Superseder:
Assigned To: Nosy List: miss-islington, ned.deily, ronaldoussoren, vstinner
Priority: normal Keywords: patch

Created on 2020-11-01 16:31 by ronaldoussoren, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23079 merged ronaldoussoren, 2020-11-01 17:03
Messages (6)
msg380152 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2020-11-01 16:31
With recent enough compilers it is possible to use --enable-optimzations when building the installer.
msg380154 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-11-01 16:37
See also bpo-41181 "[macOS] Build macOS installer with LTO and PGO optimizations".
msg380155 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2020-11-01 16:45
I'm working on a PR. 

The current version of doesn't use LTO/PGO because installers are build on macOS 10.9 where the compiler doesn't reliably support this. Recent compilers should work a lot better.

The upcoming PR enables --enable-optimizations when building on macOS 10.15 or later (Xcode 11 or 12), mostly because that's what I'm testing with. 

I'm listing 41100 as a dependency because having that is the only way to make use of this PR at the moment: uses --enable-universalsdk and 41100 introduces "universal2" as a set of architectures that can be build using Xcode 12. All other sets of architectures require Xcode 10 or older.
msg392761 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-03 03:43
New changeset e08059edef3be07ada3058d68ad2c9cc13b7418e by Ronald Oussoren in branch 'master':
bpo-42235: [macOS] Use LTO/PGO in with new enough compilers (GH-23079)
msg392762 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-03 03:49
Thanks for the PR. I am only going to apply this to the 3.10 branch for now. Perhaps when we have more experience with it, it could be backported to 3.9.x. First appearance in 3.10.0b1.
msg393432 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-05-10 21:01
Thanks Ronald!
Date User Action Args
2022-04-11 14:59:37adminsetgithub: 86401
2021-08-02 03:26:38ned.deilysetpull_requests: - pull_request24521
2021-05-10 21:01:46vstinnersetmessages: + msg393432
2021-05-03 04:01:11miss-islingtonsetpull_requests: + pull_request24521
2021-05-03 03:49:30ned.deilysetstatus: open -> closed
versions: + Python 3.10
messages: + msg392762

resolution: fixed
stage: patch review -> resolved
2021-05-03 03:46:05ned.deilysetpull_requests: - pull_request24519
2021-05-03 03:45:58ned.deilysetpull_requests: - pull_request24518
2021-05-03 03:44:06miss-islingtonsetpull_requests: + pull_request24519
2021-05-03 03:44:01miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24518
2021-05-03 03:43:59ned.deilysetmessages: + msg392761
2020-11-01 17:03:28ronaldoussorensetkeywords: + patch
stage: patch review
pull_requests: + pull_request21998
2020-11-01 16:45:14ronaldoussorensetnosy: + ned.deily
messages: + msg380155

dependencies: + Support macOS 11 and Apple Silicon Macs
components: + macOS
2020-11-01 16:37:51vstinnersetnosy: + vstinner
messages: + msg380154
2020-11-01 16:31:13ronaldoussorencreate