Build v8 for android x86 emulator

183 views
Skip to first unread message

pistachetroptrop

unread,
Mar 8, 2021, 5:24:43 AM3/8/21
to v8-users

Hi,

I am trying to build v8 for an android x86 emulator.

I have followed the steps in https://v8.dev/docs/cross-compile-arm, except that it builds for an arm emulator.

Therefore, I tried to change the arguments in the file args.gn, using :
```
target_cpu = "x86"
target_os = "android"
```

I also have :
target_os = ['android'] in my .gclient file.

After a ninja build, I get a d8 executable, except when pushing it on an x86 emulator, I get 'Illegal Instruction'.

I have also seen in the docs:
"f you specify an Android build (see below) the default CPU architecture will be "arm". You could try overriding it to "arm64", "x86", "mipsel", or "mips64el" but the GN builds for these aren't regularly tested."

Is there something I am missing ? Could someone direct me to a correct way to build for x86 android ?

Thank you in advance.

Have a nice day !

Absolu Aking

unread,
Jul 18, 2021, 9:02:34 PM7/18/21
to v8-users

Try target_cpu = "arm"
Reply all
Reply to author
Forward
0 new messages