Building old Chromium

There are two main problems that can arise if someone wants to build an ancient version of Chromium. The first is the SVN -> GIT migration that happened in 2014 that moved all the source code and dependency mirrors to GIT and the second is the force pushes in the external sources that Chromium depends on. I tried to build Chromium 34 for old project that stopped working for Android Nougat.

The first problem is mostly taken care of because even the old build got a .DEPS.git file that replaced the DEPS file for SVN and contains commit hashes instead of revision numbers. The only problem was with a dependency that had its own DEPS file with SVN revision numbers but it could be solved in the next step.

The other problem is the force pushes. The only way out of this is to use custom_deps in the .gclient configuration file. Here you can define sources for all the dependencies. At first I was trying to look up all the repositories and commits to find the closest in dates to the publishing of that Chromium. Later I found that it is easier to choose master for all of them and worry about them later when they fail to build.

After these I could at least check out the source. So the shit came later. Chromium 34 just couldn’t be built with current tools. It wasn’t the custom dependencies, it was just the whole code. Most of the problem from the system’s inability to differentiate between host and target architectures.

So I gave up and chose 40. It’s somewhat newer, it needed only 1 custom dependency and it built and the WebView Shell worked on Nougat. The problem was the patching. A lot has changed since 34 and lot of our patches didn’t work. So in the end I chose 51 because I already patched for our other project and I just adjusted the old patches to the new. I just hope I won’t need to adjust Chromium again before this product dies.