Skip to content

On Clang, LTO is ThinLTO, which leaves a lot of performance out for macOS #528

Closed as not planned

Description

@Fidget-Spinner

The LTO flag is passed in as ``--with-lto`

CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-lto"

However, on version 3.12 and higher, Clang defaults to the ThinLTO policy https://docs.python.org/3.14/using/configure.html#cmdoption-with-lto

This leaves quite a bit of perf on the table for macOS on 3.13 and higher python/cpython#122580

The fix should be to pass it --with-lto=full on 3.12 and higher.

Activity

  1. Fidget-Spinner commented on Feb 13, 2025

    @Fidget-Spinner
    Author

    Note that this might make builds take 2x time for LTO!

  2. Fidget-Spinner commented on Feb 13, 2025

    @Fidget-Spinner
    Author

    Not reproducible in upstream clang. So this might be an Apple Clang bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions