I am working on a project which uses v8 to create a javascript-runtime. I compile v8 as a static library and am using cmakelists.txt for compilation/linking purposes.
I have compiled v8 as static library with flag v8_enable_i18n_support = false in my args.gn
Is it possible to have the intl support with adding the ICU files in project directory and linking it in cmakelists.txt file that i am using for compiling.
I am not sure how intl support works for v8. Lets say if i had compiled v8 with v8_enable_i18n_support = true in my args.gn would i still need to link the icu files in my project directory? Like in the project here we see both v8 and icu files being linked in cmake
ref project
Tried compiling v8 with v8_enable_i18n_support = false but still when trying to use a function (a dayjs library method which needs intl support) i do get error intl not defined suggesting that it lack ICU support ( please correct if my understanding is wrong)
v8_enable_i18n_support = falseturns off ICU support in V8, that is the purpose of that flag.If you want ICU support, compile with
v8_enable_i18n_support = true(which is also the default, I think). V8's build system handles everything for you; when using your own build system, you will need to provide ICU for linking (statically or dynamically, both should work).