Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Use --enable-optimizations in #86401

ronaldoussoren opened this issue Nov 1, 2020 · 6 comments

[macOS] Use --enable-optimizations in #86401

ronaldoussoren opened this issue Nov 1, 2020 · 6 comments
3.10 only security fixes OS-mac type-feature A feature request or enhancement


Copy link

BPO 42235
Nosy @ronaldoussoren, @vstinner, @ned-deily, @miss-islington
  • bpo-42235: [macOS] Use LTO/PGO in with new enough compilers #23079
  • Dependencies
  • bpo-41100: Support macOS 11 and Apple Silicon Macs
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-05-03.03:49:30.740>
    created_at = <Date 2020-11-01.16:31:13.737>
    labels = ['OS-mac', 'type-feature', '3.10']
    title = '[macOS] Use --enable-optimizations in'
    updated_at = <Date 2021-08-02.03:26:38.949>
    user = '' fields:

    activity = <Date 2021-08-02.03:26:38.949>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-05-03.03:49:30.740>
    closer = 'ned.deily'
    components = ['macOS']
    creation = <Date 2020-11-01.16:31:13.737>
    creator = 'ronaldoussoren'
    dependencies = ['41100']
    files = []
    hgrepos = []
    issue_num = 42235
    keywords = ['patch']
    message_count = 6.0
    messages = ['380152', '380154', '380155', '392761', '392762', '393432']
    nosy_count = 4.0
    nosy_names = ['ronaldoussoren', 'vstinner', 'ned.deily', 'miss-islington']
    pr_nums = ['23079']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = ''
    versions = ['Python 3.10']

    Copy link
    Contributor Author

    With recent enough compilers it is possible to use --enable-optimzations when building the installer.

    @ronaldoussoren ronaldoussoren added the type-feature A feature request or enhancement label Nov 1, 2020
    Copy link

    vstinner commented Nov 1, 2020

    See also bpo-41181 "[macOS] Build macOS installer with LTO and PGO optimizations".

    Copy link
    Contributor Author

    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.

    Copy link

    New changeset e08059e by Ronald Oussoren in branch 'master':
    bpo-42235: [macOS] Use LTO/PGO in with new enough compilers (GH-23079)

    Copy link

    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.

    @ned-deily ned-deily added the 3.10 only security fixes label May 3, 2021
    Copy link

    Thanks Ronald!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    3.10 only security fixes OS-mac type-feature A feature request or enhancement
    None yet

    No branches or pull requests

    3 participants