-
Notifications
You must be signed in to change notification settings - Fork 351
Hyeon-Cheol Cho edited this page May 20, 2022
·
76 revisions
- You can add V8 flags in 'Edit - Project Settings - Plugins - UnrealJS'.
- If you want to run Unreal.js from iOS or game console, you should use jit-less. Add --jitless to flags.
- Windows
powershell -command "Invoke-WebRequest https://storage.googleapis.com/chrome-infra/depot_tools.zip -O depot_tools.zip"
7z x depot_tools.zip -o*
set PATH=%CD%\depot_tools;%PATH%
set GYP_MSVS_VERSION=2019 && set DEPOT_TOOLS_WIN_TOOLCHAIN=0
gclient config https://github.com/ncsoft/v8.git
gclient sync --with_branch_heads -r 9.7.106.9999
cd v8
-
sed -i.bak 's|configs = [ ":static_crt" ]|configs = [ ":dynamic_crt" ]|' build/config/win/BUILD.gn
(Fix some google mistakes: open file src\build\config\win\BUILD.gn and change all :static_crt to :dynamic_crt (CRT - current run time) ) gn gen out/x64.release -args="v8_use_external_startup_data=false v8_monolithic=true v8_enable_pointer_compression=false v8_enable_i18n_support=false is_debug=false v8_static_library=true is_clang=false"
ninja -C out/x64.release v8_monolith
- MacOS
git clone -q https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$(pwd)/depot_tools:$PATH
gclient config https://github.com/ncsoft/v8.git
gclient sync --with_branch_heads -r 9.7.106.9999
cd v8
gn gen out/x64.release -args="v8_use_external_startup_data=false v8_monolithic=true v8_enable_pointer_compression=false v8_enable_i18n_support=false is_debug=false v8_static_library=true symbol_level=0 libcxx_abi_unstable=false host_cpu=\"x64\" target_cpu=\"x64\""
ninja -C out/x64.release v8_monolith
cp out/x64.release/obj/libv8_monolith.a {UnrealJS}/ThirdParty/v8/lib/Mac/
- Linux
git clone -q https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$(pwd)/depot_tools:$PATH
gclient config https://github.com/ncsoft/v8.git
gclient sync --with_branch_heads -r 9.7.106.9999
cd v8
./build/install-build-deps.sh
gn gen out/x64.release -args="v8_use_external_startup_data=false v8_monolithic=true v8_enable_pointer_compression=false v8_enable_i18n_support=false is_debug=false v8_static_library=true libcxx_abi_unstable=false"
ninja -C out/x64.release v8_monolith
cp out/x64.release/obj/libv8_monolith.a {UnrealJS}/ThirdParty/v8/lib/Linux/
- Android
git clone -q https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$(pwd)/depot_tools:$PATH
gclient config https://github.com/ncsoft/v8.git
echo "target_os = ['android']" >> .gclient && gclient sync --with_branch_heads -r 9.7.106.9999
cd v8
gn gen out/arm64.release -args="v8_use_external_startup_data=false v8_monolithic=true v8_enable_pointer_compression=false v8_enable_i18n_support=false is_debug=false v8_static_library=true target_os=\"android\" target_cpu=\"arm64\""
ninja -C out/arm64.release v8_monolith
cp out/arm64.release/obj/libv8_monolith.a {UnrealJS}/ThirdParty/v8/lib/Android/Arm64/
- iOS
git clone -q https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$(pwd)/depot_tools:$PATH
gclient config https://github.com/ncsoft/v8.git
echo "target_os = ['ios']" >> .gclient && gclient sync --with_branch_heads -r 9.7.106.9999
cd v8
gn gen out/arm64.release -args="v8_use_external_startup_data=false v8_monolithic=true v8_enable_pointer_compression=false v8_enable_i18n_support=false is_debug=false v8_static_library=true ios_enable_code_signing=false target_os=\"ios\" host_cpu=\"x64\" target_cpu=\"arm64\""
ninja -C out/arm64.release v8_monolith
cp out/arm64.release/obj/libv8_monolith.a {UnrealJS}/ThirdParty/v8/lib/iOS/