Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable PGO and native builds for aarch64-unknown-linux-gnu #484

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Jan 7, 2025

No description provided.

@zanieb zanieb added platform:linux Specific to the Linux platform arch:aarch64 labels Jan 7, 2025
@indygreg
Copy link
Collaborator

indygreg commented Jan 8, 2025

We currently don't use a modern LLVM toolchain for Linux aarch64. As a result we won't get the same optimizations from PGO or LTO.

It may just work though since the CPython configure should resolve the appropriate compiler flags from the detected toolchain.

We can look into adopting modern LLVM on Linux ARM separately.

@zanieb
Copy link
Member Author

zanieb commented Jan 8, 2025

@indygreg Are you sure? Perhaps I'm misunderstanding but it looks like we cross-compile with LLVM 19

def clang_toolchain(host_platform: str, target_triple: str) -> str:
if host_platform == "linux64":
# musl currently has issues with LLVM 15+.
if "musl" in target_triple:
return "llvm-14-x86_64-linux"
else:
return "llvm-19-x86_64-linux"
elif host_platform == "macos":
if platform.mac_ver()[2] == "arm64":
return "llvm-aarch64-macos"
else:
return "llvm-x86_64-macos"
else:
raise Exception("unhandled host platform")

https://github.com/astral-sh/python-build-standalone/actions/runs/12677576491/job/35333290679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch:aarch64 platform:linux Specific to the Linux platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants