cocos-engine-external icon indicating copy to clipboard operation
cocos-engine-external copied to clipboard

V8 libs compiling question

Open cooperkuo opened this issue 5 years ago • 10 comments

Hi minggo, how do you compile V8 libraries for Windows and Android platform? May you share your compiling script or options?

Grateful! !

cooperkuo avatar Jul 29 '19 07:07 cooperkuo

@minggo @PatriceJiang ,

I'd like to re-compile V8 for android and ios. Would you please share your compiling script or options? Thanks

fastOakan avatar Mar 03 '21 09:03 fastOakan

@cooperkuo sorry for late reply. @fastOakan sure. @PatriceJiang could you please share it?

Can i know why you want to compile it yourself? Because you should modify engine codes to adapt it.

minggo avatar Mar 03 '21 09:03 minggo

@minggo there are some V8 crash reported from field, and I'd like to figure out root cause. There are lots of update to 8.0-lkgr branch of V8, and the crash problem may be fixed by these update.

fastOakan avatar Mar 03 '21 12:03 fastOakan

By the way, I'm using CocosCreator 2.4.3.

fastOakan avatar Mar 03 '21 12:03 fastOakan

Got it. @PatriceJiang is on holiday these days. He may come back next Monday.

minggo avatar Mar 04 '21 02:03 minggo

@PatriceJiang I have some urgent issue related with V8 and I'd like to change V8 code, so I need to re-compile V8. Would you please share v8 compile configuration?

fastOakan avatar Mar 08 '21 12:03 fastOakan

Checkout v8 source code to 8.0.426.16 args.gn contents :

Android

# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
is_component_build = false
is_debug = false
target_cpu = "arm64"
v8_target_cpu = "arm64"
target_os = "android"
use_goma = false
goma_dir = "None"
v8_use_external_startup_data = false
icu_use_data_file=false
clang_use_chrome_plugins = false
v8_monolithic=true
use_custom_libcxx=false
strip_debug_info=true
v8_enable_i18n_support = false        # Produces a smaller binary.

iOS

# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
ios_deployment_target = 10
is_component_build = false
is_debug = false
target_cpu = "arm64"                 
target_os = "ios"
use_custom_libcxx = false             # Use Xcode's libcxx.
use_xcode_clang = true
v8_enable_i18n_support = false        # Produces a smaller binary.
v8_monolithic = true                  # Enable the v8_monolith target.
v8_use_external_startup_data = false  # The snaphot is included in the binary.
v8_static_library=true
treat_warnings_as_errors=false
v8_enable_pointer_compression=false   

win32

is_clang=true
is_debug=false
target_cpu="x86" 
is_component_build=true
icu_use_data_file=false
use_custom_libcxx=false
v8_use_external_startup_data=false
v8_enable_i18n_support = false        # Produces a smaller binary.

@fastOakan @cooperkuo

PatriceJiang avatar Mar 09 '21 02:03 PatriceJiang

linux

# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
target_os = "linux"
use_custom_libcxx = false
clang_use_chrome_plugins = false
is_component_build = false
is_debug = false
target_cpu = "x64"
v8_static_library = true
v8_monolithic = true
v8_use_external_startup_data = false
v8_enable_test_features = false
v8_enable_i18n_support = false
symbol_level = 0

oahcy avatar Jan 11 '22 12:01 oahcy

image The crash we encountered in the background of Firebase , any suggestions?

cx-github avatar Sep 15 '23 06:09 cx-github

+1

https://github.com/dumganhar/v8/blob/main/build-android.sh

@dumganhar

liufsd avatar Jun 14 '24 07:06 liufsd