Size of the V8 static library

112 views
Skip to first unread message

Srini Edara

unread,
May 12, 2017, 6:05:57 AM5/12/17
to v8-users
We are working on the V8 version 5.3.332 & we choose to compile it as static library. We compiled the library with the following configuration.

MAKE_TARGET="android_$BUILD_LIB_VERSION.$BUILD_MODE"
make $MAKE_TARGET -j1 snapshot=off debuggersupport=off GYPFLAGS="-Dandroid_ndk_root=$NDK_DIR -Dv8_use_snapshot='false' -Dv8_enable_i18n_support=0" ANDROID_NDK_ROOT=$NDK_DIR

With the above configuration, release version of libv8_base.a is around 35MB in size. So my question is, is V8 expected  to be 35MB in size with i18n & snapshot support off ?
is there any additional flags which help us to get the v8 size reduced further ?

One more observation is, even if we pass debuggersupport=off , we are still able to build & debug my JS app. So our expectation here is, debug API's would be stripped off from library and no more runtime JS debug support available. 
Please correct if we are not passing the build configuration properly & suggest .

Zac Hansen

unread,
May 20, 2017, 1:11:33 AM5/20/17
to v8-users
why do you care about the size of the archive file?

Ian Bull

unread,
May 25, 2017, 1:18:01 AM5/25/17
to v8-users
No, that seems really big. The J2V8 static archive that I create (That includes V8 and my JavaBindings) is about 7MB. 

However, the .a files may be bigger, as they may have more debug information that you can strip out.

Cheers,
Ian
Reply all
Reply to author
Forward
0 new messages