Kotlin-native: Support Android x86 target

Created on 22 Aug 2019  路  9Comments  路  Source: JetBrains/kotlin-native

This was mentioned in #939 but unfortunately did not get enough attraction.

Quoting @atsushieno:

Well, Android x86 target is real on emulators especially with HAXM enabled. It is something significant.

Without this target, we are forced to use real devices or emulators based on arm (not being updated anymore: latest one was still Android 7) which is 10x slower than x86-based emulators according to Google. That could be inconvenient during development.

Also, iOS targets do have ios_x64 which is specifically for emulators (I think), so I really couldn't understand why proper Android emulators are not supported.

Most helpful comment

Maybe android_x86 is also needed, since only x86 is in the "recommended" system images:

image

But there are x86_64 images too, so there could be some people using them.

All 9 comments

x86 specifically or x86_64 ? In which case, see https://github.com/JetBrains/kotlin/pull/2538

Maybe android_x86 is also needed, since only x86 is in the "recommended" system images:

image

But there are x86_64 images too, so there could be some people using them.

x86 is very important for emulator, and especially for cases when you use it on CI

@olonho This PR covers only Android x86_64, are there any plans to support Android x86?

It's not hard to do, with toolchain architecture changed in this PR, but someone got to convince me that it is indeed needed.

@olonho

  1. The main reason for me is x86 emulator, which is the main target ABI for Android emulators. It uses less memory than x86_64 emulator and recommended to use by Google.
    Also, some CIs are x86 OS, so you just cannot run x86_64 emulator using native architecture on them. One more point about emulator that x86 emulator supports only x86 target, ARM emulation is not supported as on many other real devices
  2. Some devices (smartwatches) based on Intel Z3520 chipset supports only x86 architecture even ARM emulation is not supported
  3. Many other devices (mostly based on Intel C3230, Intel Z3735, Intel Z8500) are x86 only. They support armeabi-v7a emulation mode, but it's significantly slower than native x86. Google Play device catalog contains 217 certificated models of devices that are x86 with armeabi-v7a emulation support

This statistics doesn't include any non-certificated devices (ones without Google Play Services) such as TV boxes, GPS trackers, navigators, car head units, players, and many other devices that use Android as OS but do not provide access to Google Play

For image references please see the above reply (11 days ago). That's from AVD manager.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AregevDev picture AregevDev  路  3Comments

Marcopohlo picture Marcopohlo  路  4Comments

tarek360 picture tarek360  路  4Comments

msink picture msink  路  4Comments

nhachicha picture nhachicha  路  4Comments