Skip to content

Instantly share code, notes, and snippets.

@longht021189
Last active June 7, 2021 02:28
Show Gist options
  • Save longht021189/4e05d54f6adbb96a347c904f544036ed to your computer and use it in GitHub Desktop.
Save longht021189/4e05d54f6adbb96a347c904f544036ed to your computer and use it in GitHub Desktop.
Build V8 - Note

Build V8 Note

Step by step:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ~/.v8/depot_tools
export PATH=~/.v8//depot_tools:$PATH
gclient
cd path/to/v8/folder
fetch v8
  • Generate Ninja Folder (with '...' is v8 input)
cd path/to/v8/folder/v8
gn gen out/foo --args='...'
  • Build
ninja -C out/foo v8_monolith
  • Out here: out/foo/obj/libv8_monolith.a

V8 Input

  • Print all
gn args out/foo --list
  • Example for ios build
enable_ios_bitcode=true ios_deployment_target=10 is_component_build=false is_debug=false target_os="ios" use_custom_libcxx=false use_xcode_clang=true v8_enable_i18n_support=false v8_monolithic=true v8_use_external_startup_data=false is_clang=true cppgc_enable_caged_heap=false is_official_build=true fatal_linker_warnings=false treat_warnings_as_errors=false

Turn off iOS Signing

Find ios_sdk.gni in v8/build/config/ios and set ios_enable_code_signing to false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment