Skip to content

Enable native builds on Linux aarch64 #670

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Jun 28, 2025

Rebase of #607

Uses #672 and #673 to abstract some of the changes to the CI matrix.

@zanieb zanieb added the platform:linux Specific to the Linux platform label Jun 28, 2025
@zanieb zanieb force-pushed the zb/aarch64-native branch 3 times, most recently from 2aff89e to 1b9b6ce Compare June 28, 2025 03:46
zanieb added a commit that referenced this pull request Jun 28, 2025
I think this will be a useful precursor to
#670
zanieb added a commit that referenced this pull request Jun 28, 2025
@zanieb zanieb force-pushed the zb/aarch64-native branch from 1b9b6ce to fa119e9 Compare June 28, 2025 17:00
@zanieb zanieb removed the ci:dry-run label Jun 28, 2025
@zanieb zanieb force-pushed the zb/aarch64-native branch 5 times, most recently from f8cd0b1 to 801d42a Compare June 28, 2025 18:33
indygreg and others added 4 commits June 28, 2025 14:04
This seems to "just work." Let's stay modern.
I think deletion of the legacy proto packages a few commits ago fixed up
the build failures the deleted comment alluded to.
I just published an LLVM 20 toolchain for aarch64. The toolchain
has support for PGO and BOLT.

This commit switches the Linux aarch64 builds to be performed natively
on aarch64 machines. PGO and BOLT are enabled on the builds, hopefully
making them a bit faster.
@zanieb zanieb marked this pull request as ready for review June 28, 2025 19:08
@zanieb zanieb force-pushed the zb/aarch64-native branch from 801d42a to e06fb79 Compare June 28, 2025 19:08
@zanieb
Copy link
Member Author

zanieb commented Jun 28, 2025

As I mentioned at #607 (comment) — I need to review this myself as I did not review the original implementation and there may be some clean-up to be done after hacking things to work.

{"name": "gcc", "arch": "x86_64"},
{"name": "gcc.debian9", "arch": "aarch64"},
{"name": "xcb.debian9", "arch": "aarch64"},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can drop xcb per #627

"toolchain-image-gcc",
"toolchain-image-xcb",
"toolchain-image-xcb.cross",
"toolchain-image-xcb.cross-riscv64",
"toolchain-image-xcb.debian9",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,3 @@
{% include 'build.debian9.Dockerfile' %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -89,13 +89,17 @@ def add_target_env(env, build_platform, target_triple, build_env):
extra_host_ldflags = []

if build_platform == "linux_x86_64":
env["BUILD_TRIPLE"] = "x86_64-unknown-linux-gnu"
machine = platform.machine()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this section should be refactored to look like the elif build_platform.startswith("macos_"): branch?

@@ -496,10 +504,14 @@ def python_build_info(

binary_suffix = ""

if platform == "linux_x86_64":
if platform in ("linux_x86_64", "linux_aarch64"):
arch = "aarch64" if platform == "linux_aarch64" else "x86_64"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably make this exhaustive

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

Successfully merging this pull request may close these issues.

2 participants