Sitelet https://github.com/AztecProtocol/aztec-packages/pull/20759
Skip to content

fix: prioritize Android over Linux in build.rs target detection - #20759

Merged
johnathan79717 merged 1 commit into
nextfrom
jh/fix-android-build-rs-detection
Feb 23, 2026
Merged

johnathan79717 merged 1 commit into
nextfrom
jh/fix-android-build-rs-detection

Conversation

@johnathan79717

@johnathan79717 johnathan79717 commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Android Rust targets (e.g. aarch64-linux-android, x86_64-linux-android) contain the linux keyword, causing them to incorrectly match the Linux match arms in build.rs before reaching the Android ones
  • Moves Android match arms above Linux ones so they take precedence

Test plan

  • cargo check -p barretenberg-rs --target aarch64-linux-android with BB_LIB_DIR pointing to Android libs — passes
  • cargo check -p barretenberg-rs --target aarch64-linux-android with BARRETENBERG_VERSION=4.0.0-rc.5 — successfully downloads barretenberg-static-arm64-android.tar.gz (not arm64-linux)

Android targets (e.g. aarch64-linux-android) contain the "linux"
keyword, causing them to match the Linux branches before reaching
the Android ones. Move Android match arms above Linux to fix this.
@johnathan79717
johnathan79717 added this pull request to the merge queue Feb 23, 2026
Merged via the queue into next with commit 8872422 Feb 23, 2026
20 checks passed
@johnathan79717
johnathan79717 deleted the jh/fix-android-build-rs-detection branch February 23, 2026 12:38
@ludamad

ludamad commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants