Skip to content
Hyeon-Cheol Cho edited this page May 20, 2022 · 76 revisions

Flags

  • You can add V8 flags in 'Edit - Project Settings - Plugins - UnrealJS'.

Jit less V8

  • If you want to run Unreal.js from iOS or game console, you should use jit-less. Add --jitless to flags.

Build


  • Windows
  1. powershell -command "Invoke-WebRequest https://storage.googleapis.com/chrome-infra/depot_tools.zip -O depot_tools.zip"
  2. 7z x depot_tools.zip -o*
  3. set PATH=%CD%\depot_tools;%PATH%
  4. set GYP_MSVS_VERSION=2019 && set DEPOT_TOOLS_WIN_TOOLCHAIN=0
  5. gclient config https://github.com/ncsoft/v8.git
  6. gclient sync --with_branch_heads -r 9.7.106.9999
  7. cd v8
  8. 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) )
  9. 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"
  10. ninja -C out/x64.release v8_monolith
  • MacOS
  1. git clone -q https://chromium.googlesource.com/chromium/tools/depot_tools.git
  2. export PATH=$(pwd)/depot_tools:$PATH
  3. gclient config https://github.com/ncsoft/v8.git
  4. gclient sync --with_branch_heads -r 9.7.106.9999
  5. cd v8
  6. 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\""
  7. ninja -C out/x64.release v8_monolith
  8. cp out/x64.release/obj/libv8_monolith.a {UnrealJS}/ThirdParty/v8/lib/Mac/
  • Linux
  1. git clone -q https://chromium.googlesource.com/chromium/tools/depot_tools.git
  2. export PATH=$(pwd)/depot_tools:$PATH
  3. gclient config https://github.com/ncsoft/v8.git
  4. gclient sync --with_branch_heads -r 9.7.106.9999
  5. cd v8
  6. ./build/install-build-deps.sh
  7. 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"
  8. ninja -C out/x64.release v8_monolith
  9. cp out/x64.release/obj/libv8_monolith.a {UnrealJS}/ThirdParty/v8/lib/Linux/
  • Android
  1. git clone -q https://chromium.googlesource.com/chromium/tools/depot_tools.git
  2. export PATH=$(pwd)/depot_tools:$PATH
  3. gclient config https://github.com/ncsoft/v8.git
  4. echo "target_os = ['android']" >> .gclient && gclient sync --with_branch_heads -r 9.7.106.9999
  5. cd v8
  6. 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\""
  7. ninja -C out/arm64.release v8_monolith
  8. cp out/arm64.release/obj/libv8_monolith.a {UnrealJS}/ThirdParty/v8/lib/Android/Arm64/
  • iOS
  1. git clone -q https://chromium.googlesource.com/chromium/tools/depot_tools.git
  2. export PATH=$(pwd)/depot_tools:$PATH
  3. gclient config https://github.com/ncsoft/v8.git
  4. echo "target_os = ['ios']" >> .gclient && gclient sync --with_branch_heads -r 9.7.106.9999
  5. cd v8
  6. 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\""
  7. ninja -C out/arm64.release v8_monolith
  8. cp out/arm64.release/obj/libv8_monolith.a {UnrealJS}/ThirdParty/v8/lib/iOS/
Clone this wiki locally