reflex-platform
reflex-platform copied to clipboard
Feature: Support Android ABIs x86 and x86_64
Would it be possible to support the mentioned ABIs for android builds? My guess is that this couldn't be to complicated, but my tries to implement this failed - mainly because of lacking nix skills.
It's definitely possible with the right crossSystem, but you'll have to build your own GHC:
crossSystem = {
config = "x86_64-unknown-linux-android";
useAndroidPrebuilt = true;
ndkVer = "18b";
sdkVer = "24";
}
It actually is broken. This should get us closer:
https://github.com/NixOS/nixpkgs/pull/69309
Oh great idea, especially since we already have the iOS symulator thing. @matthewbauer Can we add the platform to the nixpkgs examples?
Oh great idea, especially since we already have the iOS symulator thing. @matthewbauer Can we add the platform to the nixpkgs examples?
It looks like ghc 8.6.5 doesn't have support for it:
(GHC version 8.6.5 for x86_64-unknown-linux-android):
Failed to lookup the datalayout for x86_64-unknown-linux-android; available targets: ["i386-unknown-windows","i686-unknown-windows","x86_64-unknown-windows","arm-unknown-linux-gnueabihf","armv7a-unknown-linux-androideabi","armv6-unknown-linux-gnueabihf","armv6l-unknown-linux-gnueabihf","armv7-unknown-linux-gnueabihf","armv7a-unknown-linux-gnueabi","armv7l-unknown-linux-gnueabihf","aarch64-unknown-linux-gnu","aarch64-unknown-linux","i386-unknown-linux-gnu","i386-unknown-linux","x86_64-unknown-linux-gnu","x86_64-unknown-linux","armv7-unknown-linux-androideabi","aarch64-unknown-linux-android","powerpc64le-unknown-linux","amd64-portbld-freebsd","arm-unknown-nto-qnx-eabi","i386-apple-darwin","x86_64-apple-darwin","armv7-apple-ios","aarch64-apple-ios","i386-apple-ios","x86_64-apple-ios","aarch64-unknown-freebsd","armv6-unknown-freebsd-gnueabihf","armv7-unknown-freebsd-gnueabihf"]
CallStack (from HasCallStack):
error, called at compiler/llvmGen/LlvmCodeGen.hs:96:24 in ghc:LlvmCodeGen
https://gitlab.haskell.org/ghc/ghc/issues/16736 already complains about the missing platform. As it seems it's included in GHC 8.8 but as far as I can tell not in the next GHC 8.6 release (for now).
Now that we've switched to GHC 8.10.7, perhaps this is worth another look.