Skip to content

Support PGO in cross-compiles when transparent emulation is available #141926

@zanieb

Description

@zanieb

A while ago, in 1abe1c5 (from https://bugs.python.org/issue14330) configure was updated to unset RUNSHARED when cross compiling. Unfortunately, this has the effect of disabling PGO during cross-compiles.

In python-build-standalone we patch this out so we can run PGO as we do frequent cross-compilation on systems that support emulated execution of the target binary, e.g., x86-64 macOS can be run on aarch64 via Rosetta.

I'd like to upstream this patch (see astral-sh/python-build-standalone#864) in a generalized form.

This is a subset of #113123 which is about generalized support for PGO in cross-compiles and focuses on setting a variable to wrapper program allowing emulated execution. I intend to look into that separately.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions