Add 32-bit ARM (armeabi-v7a) Android target support#33
Closed
jappeace-sloth wants to merge 1 commit intojappeace:masterfrom
Closed
Add 32-bit ARM (armeabi-v7a) Android target support#33jappeace-sloth wants to merge 1 commit intojappeace:masterfrom
jappeace-sloth wants to merge 1 commit intojappeace:masterfrom
Conversation
Enables haskell-mobile to cross-compile for armv7a-android, targeting Wear OS devices that ship 32-bit ARM userspace only (e.g. OnePlus Watch 3). Key changes: - Parameterize nix/lib.nix, cross-deps.nix, android.nix with androidArch - Multi-arch APK support in mkApk (accepts sharedLibs list) - Update nixpkgs pin for GHC LLVM backend fix (NixOS/nixpkgs#440774) - Patch nixpkgs compiler-rt for armv7a: add to ARM32 arch set, fix baremetal arch detection, exclude os_version_check.c (no pthread.h) - Patch LLVM package set: use libstdcxxClang (no libcxx dep) for Android to avoid unbuildable libcxx bootstrap (GNU ld.bfd can't link Android libs) - Disable profiled libraries for armv7a (LLVM ARM backend llc crash in ARMAsmPrinter::emitXXStructor) Closes jappeace#28 Prompt: continue implementing armv7a-android support (issue jappeace#28), fixing libcxx bootstrap linker issue and LLVM profiling crash Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 6, 2026
Author
|
Superseded by #34 which was already merged and contains all commits from this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
androidArchparameter (default"aarch64") to support both arm64-v8a and armeabi-v7a targetsmkApknow accepts asharedLibslist of{ lib, abiDir }for bundling multiple architecturescompiler-rtfor armv7a: add to ARM32 arch set, fix baremetal arch detection (COMPILER_RT_DEFAULT_TARGET_ONLY), excludeos_version_check.c(nopthread.hin baremetal)libstdcxxClang(no libcxx dependency) for Android targets, avoiding unbuildable libcxx bootstrap (GNUld.bfdcan't link Android libraries due to zstd compression, path mismatches)llccrash inARMAsmPrinter::emitXXStructor)broken = useLLVMin GHC (haskell.compiler.ghc{948,967,984,9102,9103,9121,9122}: backport patches for LLVM support NixOS/nixpkgs#440774)Closes #28
Test plan
nix-build nix/android.nix— aarch64 (default) builds successfullynix-build nix/android.nix --arg androidArch '"armv7a"'— armv7a builds successfullynix-build nix/ci.nix -A native -A android-aarch64 -A android-armv7a— all CI targets passlib/arm64-v8a/andlib/armeabi-v7a/nix-build nix/apk.nix) — needs i686-linux builder support for Android SDK tools🤖 Generated with Claude Code