On Tue, May 21, 2019 at 8:45 PM Joel Scarfone <
joelrs...@gmail.com> wrote:
> I do not want to have to include icudtl.dat on the machine running my executable that i have v8 embedded in to achieve the EXMAScript 402 specification (going off of
https://v8.dev/docs/i18n). Is there any way to do this?
You can (Node.js does, for example) but I don't know how
well-documented or supported it is. Googling 'icu genccode' doesn't
turn up any hits for me at any rate. :-)
ICU's source/tools/genccode/genccode.c turns the data file into a .c
file that you can compile and link into your final executable or
library. There's a bit of a chicken and egg problem in that genccode.c
itself depends on ICU but you can work around it by linking genccode
to source/stubdata/stubdata.cpp.
I'd refer you to how Node.js builds its embedded copy of ICU but it
also has extra steps to strip unneeded data and such, so it's a little
more complex than what I just described. But if you're interested, the
steps are here:
https://github.com/nodejs/node/blob/165916b1f3ec094b1694bd5a056c2fc5e56027c2/tools/icu/icu-generic.gyp