conda-forge / conda-forge/python-feedstock

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

未关闭
#903 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Shell
星标
47
派生
112
平均合并
2 天 9 小时
30 天内合并 PR
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 摘要。