# Build V8 Note ## Step by step: - Checkout by depot-tools [https://v8.dev/docs/source-code] ``` 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