In order to be able to build V8 from scratch on Windows/Linux/Mac for x64 please heed the following steps:
More in-depth information can be found here.
On Linux or Mac, first install git and then depot_tools. On Windows, follow the Chromium instructions (for Googlers, otherwise) to install Visual Studio, Debugging tools for Windows and depot_tools (which on Windows includes git).
Update depot_tools
by executing the following into your terminal/shell. On Windows, this has to be done in the Command Prompt (cmd.exe), as opposed to PowerShell or others.
gclient
Go into the directory where you want to download the V8 source into and execute the following in your terminal/shell:
fetch v8
cd v8
Don’t simply git clone
the V8 repository!
More in-depth information can be found here.
For macOS: install Xcode and accept its license agreement. (If you’ve installed the command-line tools separately, remove them first.)
Make sure that you are in the V8 source directory. If you followed every step up until step 4 above, you’re already at the right location.
Download all the build dependencies by executing the following in your terminal/shell:
gclient sync
(only on linux, only needed once) Install build dependencies by executing the following in your terminal/shell:
./build/install-build-deps.sh
Generate the necessary build files by executing the following in your terminal/shell:
tools/dev/v8gen.py x64.release
Compile the source by executing the following in your terminal/shell:
ninja -C out.gn/x64.release
Run the tests by executing the following in your terminal/shell:
tools/run-tests.py --gn