[v8-users] How to build android version of V8?

507 views
Skip to first unread message

Shooting

unread,
May 11, 2010, 1:31:36 PM5/11/10
to v8-users
Hi all
I'm new to this javascript engine. I just heard that Android 2.0
already uses V8 in its webkit. So suppose V8 can build under NDK. The
question is how to do that? Seems we don't have direct option in V8
project to build a standalone V8 binary for android?

--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users

Kelly

unread,
Jun 23, 2010, 6:29:17 PM6/23/10
to v8-users
You need to set up some environment variables and pass some args into
scons to get v8 to build for android. Also, from what I've seen, you
also need to have the android platform on your machine. I'm sure you
can work around it but I haven't gotten to it yet.

To build I am using a script with this (totally stolen from another
thread):

export TOP=<location of android platform>
export NDK=<location of android NDK r4>/build/prebuilt/darwin-x86/arm-
eabi-4.4.0
(notice it says darwin, that's because I'm on mac, it's different for
others)
export AR=$NDK/bin/arm-eabi-ar
export CXX=$NDK/bin/arm-eabi-g++
export RANLIB=$NDK/bin/arm-eabi-ranlib
export CC=$NDK/bin/arm-eabi-gcc

scons mode=debug snapshot=off library=static importenv=TOP arch=arm
os=android

This, along with a few minor source changes, will build and link v8. I
can run scripts with it, but running javascript (native or local)
functions is currently failing for me.


On May 11, 10:31 am, Shooting <shooting...@gmail.com> wrote:
> Hi all
> I'm new to this javascript engine. I just heard thatAndroid2.0
> already uses V8 in its webkit. So suppose V8 can build under NDK. The
> question is how to do that? Seems we don't have direct option in V8
> project to build a standalone V8 binary forandroid?
>
> --
> v8-users mailing list
> v8-users@googlegroups.comhttp://groups.google.com/group/v8-users

Wink Saville

unread,
Jun 25, 2010, 8:59:56 PM6/25/10
to v8-u...@googlegroups.com
In the froyo release external/v8 exists and a static library is built you
just need to link to it.

-- Wink 

Glidos

unread,
Sep 26, 2012, 11:37:15 AM9/26/12
to v8-u...@googlegroups.com
On Saturday, June 26, 2010 1:59:56 AM UTC+1, Wink wrote:
In the froyo release external/v8 exists and a static library is built you
just need to link to it.

Can I do so from the native part of an app built with the NDK, or is
this advice only for those working on the android source? Also,
where can I obtain the library? Do I need to build it, or is it
hiding somewhere I've yet to uncover?
Reply all
Reply to author
Forward
0 new messages