In order to be able to build V8 from scratch on Linux/Mac for x64 please heed the following steps:
More in-depth information can be found here.
Update depot_tools
by executing the following into your terminal/shell:
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
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