conda-forge / conda-forge/python-feedstock

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

オープン
#903 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Shell
スター
47
フォーク
112
平均マージ
2日 9時間
マージ済み PR(30日)
18

説明

## 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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。