In order to be able to build V8 from scratch on Windows/Linux/Mac for x64 please heed the following steps:

Getting the V8 source TL;DR

More in-depth information can be found here.

  1. 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).

  2. 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
    
  3. 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!

Building V8 TL;DR

More in-depth information can be found here.

  1. For macOS: install Xcode and accept its license agreement. (If you’ve installed the command-line tools separately, remove them first.)

  2. 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.

  3. Download all the build dependencies by executing the following in your terminal/shell:

    gclient sync
    
  4. (only on linux, only needed once) Install build dependencies by executing the following in your terminal/shell:

    ./build/install-build-deps.sh
    
  5. Generate the necessary build files by executing the following in your terminal/shell:

    tools/dev/v8gen.py x64.release
    
  6. Compile the source by executing the following in your terminal/shell:

    ninja -C out.gn/x64.release
    
  7. Run the tests by executing the following in your terminal/shell:

    tools/run-tests.py --gn