0

I tried building V8 following instruction from Hellow world V8 However the lib libv8_monolith.a generted is of 28 MB size. I see framework like Deno which do use V8 underneath is of roughly around only 12 MB. So how do I build a V8 shared lib of smaller size ?

Anurag Vohra
  • 1,781
  • 12
  • 28

1 Answers1

0

The first thing to try (on any C/C++ application) is to run strip on the final binary.

Another thing you could consider is to compile V8 without i18n support (v8_enable_i18n_support = false is the GN arg for that). Many features of the built-in Intl object as well as RegExp unicode support will then not work properly, but depending on your use case that might be okay, and it saves the dependency on ICU which is several megabytes.

jmrk
  • 34,271
  • 7
  • 59
  • 74