Building V8 from source
In order to be able to build V8 from scratch on Windows/Linux/macOS for x64, please follow the following steps.
Getting the V8 source code #
Follow the instructions in our guide on checking out the V8 source code.
Installing build dependencies #
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 in the previous section, you’re already at the right location.
Download all the build dependencies:
gclient syncFor Googlers - If you see Failed to fetch file or Login required errors when running the hooks, try authenticating with Google Storage first by running:
gsutil.py configLogin with your @google.com account, and enter
0when asked for a project ID.This step is only needed on Linux. Install additional build dependencies:
./build/install-build-deps.sh
Building V8 #
Make sure that you are in the V8 source directory on the
mainbranch.cd /path/to/v8Pull in the latest changes and install any new build dependencies:
git pull && gclient syncCompile the source:
tools/dev/gm.py x64.releaseOr, to compile the source and immediately run the tests:
tools/dev/gm.py x64.release.checkFor more information on the
gm.pyhelper script and the commands it triggers, see Building with GN.