~eliasnaur/gio#397: 
Prevent gioui from building some Linux-specific stuff on Android

Thank you for making such a cool project. I was trying to integrate it with GoMobile bindings to talk with native stuff on Android and iOS, which I know isn't a supported configuration, however I was able to figure it out and it works great! There is just one small thing which it would be helpful to change:

//go:build linux && (arm64 || arm || amd64) // +build linux // +build arm64 arm amd64

This build pattern appears in the gioui.org/cpu and the gioui.org/shader/piet packages, which causes some trouble when building on Linux for Android. Building on MacOS for Android works fine for whatever reason. Would it be possible to change to something like "linux && !android"? I've seen this pattern used in a few places in the project.

The sample project I wrote is at github (dot) com/empathicqubit/gioui-gomobile-example . I've overridden these packages in the /gio/cpu and /gio/shader folders, but it would be nice to remove the override. I stubbed out the entire packages since I don't need CPU drawing support for what I was doing.

Regards, Empathic Qubit

Status
REPORTED
Submitter
Empathic Qubit
Assigned to
No-one
Submitted
7 months ago
Updated
6 months ago
Labels
No labels applied.

~eliasnaur 6 months ago

Adding !android would defeat the main purpose of CPU drawing: old Android phones. I would be open to a nocpu tag, however.

Register here or Log in to comment, or comment via email.