V8 library size

2.3k Views Asked by At

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

1

There are 1 best solutions below

0
On

How big are your final linked binaries? Have you called strip on them? For comparison, my build of the d8 shell, statically linked for Android/arm32, is about 9MB (for current V8 versions).