- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5
          Add support for aarch64-linux
          #716
        
          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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A really nice move in the right direction ! I'm so excited to see where we are now and what we can achieve in the future 😁 So far so good, I rebuilt a few things locally and packages a few packages and I saw no bugs. Once this PR is merged during the weekend, we should open issues to track the remaining works to do.
This is intended to be used as a check requirement for PRs, similar to the "All tests passed" job from the main Brioche repo
This PR updates all packages plus the GitHub Actions "Build" workflow to support building for
aarch64-linux.To start, there's a new
std.CURRENT_PLATFORMconst which uses the new JS op from brioche-dev/brioche#260.std.toolchainalso took a bit of iteration (building off some old work in 42b098c). But the changes there are mostly "boring", and mostly come down to using the right target triple or dynamic linker path based on platform. I updated the runtime utils to the latest commit used acrossstd.Once the toolchain was working, most packages built fine for aarch64 without any extra changes! There were a handful of exceptions though, and the following packages were tweaked:
bugstalker: Doesn't support aarch64 at all today (it's marketed as an x86-64 debugger). I added an assertion to prevent building it plus a "magic comment" to skip it in the build workflow.go,rust,nodejs: Use pre-built artifacts, so needed adjustment to download the aarch64 versions of each.gitui,xplr: Removed upstream-provided.cargo/config.toml. These were overriding the aarch64 linker, which I'm guessing was set up for cross-compilation in CI? Anyway, just removing the file from the source fixed the build.linux: Requiredpythonas a dependency when building for aarch64 with the default configuration. Not sure why... but I addedpythonas a dependency (regardless of platform) to fix it.llvm: Required more RAM to build than was available on our aarch64 runner (M1 Mac mini running Asahi Linux). As a quick hack, I just tweaked the parallelism based on platform.proot,strace: Had issues around 32-bit ARM personalities, so I adjusted their builds for now. We should fix this in the future.Finally, I updated the CI/CD pipeline for aarch64 using a custom runner (M1 Mac mini with Asahi Linux). It's a lot slower than our custom x86-64 runner, so I also had to bump up the timeout for the "build" CI/CD pipeline: a full rebuild appears to take ~16 hours on aarch64 compared to ~8 hours for x86-64, and I set the new timeout to 24 hours to give some overhead.
I also updated the CI/CD pipeline to skip packages based on a "magic comment": if a package contains the string
@brioche-packages skip-platform aarch64-linuxit'll be skipped on aarch64 (also works to skip a package for x86-64). This is currently only used bybugstalker, since the upstream project doesn't support it (and would take a significant lift to add support, since it's a debugger and therefore deals with architecture-specific details)