0

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

Srini Edara
  • 101
  • 6
  • are you confusing the concept of an archive and what actually gets linked into your executable? The linker doesn't just shove the .a file into your binary. It picks and chooses what it needs and only inserts that into your final binary. – xaxxon May 25 '17 at 04:07

1 Answers1

1

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).

jmrk
  • 34,271
  • 7
  • 59
  • 74