V8’s version numbering scheme
V8 version numbers are of the form
x.yis the Chromium milestone divided by 10 (e.g. M60 →
zis automatically bumped whenever there’s a new LKGR (typically a few times per day)
wis bumped for manually backmerged patches after a branch point
0, it’s omitted from the version number. E.g. v5.9.211 (instead of “v188.8.131.52”) gets bumped up to v184.108.40.206 after backmerging a patch.
Which V8 version should I use? #
Embedders of V8 should generally use the head of the branch corresponding to the minor version of V8 that ships in Chrome.
Finding the minor version of V8 corresponding to the latest stable Chrome #
To find out what version this is,
- Go to https://omahaproxy.appspot.com/
- Find the latest stable Chrome version in the table
- Check the
v8_versioncolumn (to the right) on the same row
Example: at the time of this writing, the site indicates that for
stable, the Chrome release version is 59.0.3071.86, which corresponds to V8 version 220.127.116.11.
Finding the head of the corresponding branch #
V8’s version-related branches do not appear in the online repository at https://chromium.googlesource.com/v8/v8.git; instead only tags appear. To find the head of that branch, go to the URL in this form:
Example: for the V8 minor version 5.9 found above, we go to https://chromium.googlesource.com/v8/v8.git/+/branch-heads/5.9, finding a commit titled “Version 18.104.22.168”. Thus, the version of V8 that embedders should use at the time of this writing is 22.214.171.124.
Caution: You should not simply find the numerically-greatest tag corresponding to the above minor V8 version, as sometimes those are not supported, e.g. they are tagged before deciding where to cut minor releases. Such versions do not receive backports or similar.
Example: the V8 tags
126.96.36.199, …, and
5.9.223 are abandoned, despite being numerically greater than the branch head of 188.8.131.52.
Checking out the head of the corresponding branch #
If you have the source already, you can check out the head somewhat directly. If you’ve retrieved the source using
depot_tools then you should be able to do
git branch --remotes | grep branch-heads/
to list the relevant branches. You'll want to check out the one corresponding to the minor V8 version you found above, and use that. The tag that you end up on is the appropriate V8 version for you as the embedder.
If you did not use
.git/config and add the line below to the
[remote "origin"] section:
fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
Example: for the V8 minor version 5.9 found above, we can do:
$ git checkout branch-heads/5.9
HEAD is now at 8c3db649d8... Version 184.108.40.206