Skip to content
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

Only build for ARM by default? #86

Open
rmartin16 opened this issue Apr 4, 2024 · 3 comments
Open

Only build for ARM by default? #86

rmartin16 opened this issue Apr 4, 2024 · 3 comments
Labels
android The issue relates to Android mobile support. enhancement New features, or improvements to existing features.

Comments

@rmartin16
Copy link
Member

rmartin16 commented Apr 4, 2024

What is the problem or limitation you are having?

I discovered recently that the Android emulator was updated several years back to support running ARM binaries on x86 Android.

Describe the solution you'd like

So, with that in mind, is there still value in building for x86-64, by default? Or, said another way, is there value in continuing to target x86-64 as well as arm64 beyond support for the Android emulator on x86?

If not, should x86-64 be removed from default builds?

Describe alternatives you've considered

Status quo.

Additional context

I'm assuming that x86-64 builds are only done for the Android emulator; obviously, if there are other reasons, this point is moot.

@rmartin16 rmartin16 added the enhancement New features, or improvements to existing features. label Apr 4, 2024
@freakboy3742 freakboy3742 added the android The issue relates to Android mobile support. label Apr 4, 2024
@freakboy3742
Copy link
Member

freakboy3742 commented Apr 4, 2024

AIUI, the benefit is speed. ARM on x86 requires CPU-level emulation, which is possible, but not as fast as native x86. Given that the vast majority of Android developers will also be x86 users on the desktop, I wouldn't want to make x86 development unworkably slow (or unreliable) for the sake of making our builds marginally faster.

I think there is also a historical use case for x86/x86_64 builds for Intel Atom hardware, but don't think either of the users of those devices are also Briefcase users 😝

See also beeware/briefcase#808 for a request for configuring the ABIs that are built by default.

@rmartin16
Copy link
Member Author

Given that the vast majority of Android developers will also be x86 users on the desktop, I wouldn't want to make x86 development unworkably slow (or unreliable) for the sake of making our builds marginally faster.

In the Android PR I linked, they do call out speed considerations in that they explicitly optimized the system images to run everything except for the ARM binaries using native x86. So, while I haven't really stressed it, the slowdown should not be nearly as remarkable as full ARM emulation is. And furthermore, if none of the packages contain binaries, then nothing should be emulated.

Additionally, there is also the space consideration I didn't mention; I've noticed that when users hit the space limits, removing x86 can be a solution.

@mhsmith
Copy link
Member

mhsmith commented Apr 4, 2024

That page only mentions Android 11, while our minimum is currently Android 6. So unless they've backported this feature, we won't be able to rely on it yet.

For the space consideration, we could remove armeabi-v7a by default, as long as there's an easy way to put it back (beeware/briefcase#808).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android The issue relates to Android mobile support. enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

3 participants