conda-forge / conda-forge/python-feedstock

Enable LTO and PGO for native Linux AArch64 builds on Python 3.10-3.12

Aperta
#903 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
47
Fork
112
Merge medio
2g 9h
PR unite (30g)
18

Descrizione

## Summary

Linux AArch64 release builds on the Python 3.10, 3.11, and 3.12
maintenance branches still set `_OPTIMIZED=no`, disabling the existing
LTO and PGO build path.

That override was introduced in 2019 because optimized builds took too
long in emulated CI. These branches now run their Linux AArch64 jobs on
native `ubuntu-24.04-arm` runners with AArch64 container images.

## Current state

| Branch | Linux AArch64 release result |
|--------|------------------------------|
| 3.10 | LTO disabled, PGO disabled |
| 3.11 | LTO disabled, PGO disabled |
| 3.12 | LTO disabled, PGO disabled |

The optimized block already present in each branch enables LTO and, when
the build is not cross-compiling, adds `--enable-optimizations`, runs
`profile-opt`, and uses `PROFILE_TASK="-m test --pgo"`.

## Proposal

Remove only the `linux-aarch64` `_OPTIMIZED=no` override from the 3.10,
3.11, and 3.12 maintenance branches and bump each recipe build number.
Keep the PPC64LE override unchanged because that target is still mapped
to an x86_64 build platform.

This reuses each branch's existing optimization path:

- 3.10 and 3.11: existing `--with-lto` plus PGO
- 3.12: existing `--with-lto=full` plus PGO

## Evidence

- Historical disable commit:
https://github.com/conda-forge/python-feedstock/commit/b2374b9934dde07caa374cda2d4ffb7c518da07c
- Previous optimization re-enable PR for the then-current branch:
https://github.com/conda-forge/python-feedstock/pull/739
- Native ARM runner transition:
https://github.com/conda-forge/python-feedstock/commit/babe1dd57b80d10394868f16e84918779abde9fe

## Validation

I will open one draft PR per maintenance branch. Native Linux AArch64
GitHub Actions jobs will be used to validate the PGO training and optimized
rebuild. The PRs will be linked here after creation.

## Known compatibility concern

Native AArch64 Python rebuilds are currently associated with the downstream
cross-AArch64 C++ extension linking regression tracked in #880. This proposal
does not change the affected sysconfig/linker behavior; the optimization PRs
will remain drafts so that this rebuild risk can be assessed explicitly.

## Pull requests

- Python 3.10: https://github.com/conda-forge/python-feedstock/pull/904
- Python 3.11: https://github.com/conda-forge/python-feedstock/pull/905
- Python 3.12: https://github.com/conda-forge/python-feedstock/pull/906

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.