

Setting up the buildĬhromium uses Ninja as its main build tool along with a tool called GN to generate. Optional: You can also install API keys if you want your build to talk to some Google services, but this is not necessary for most development and testing purposes. Once you've run install-build-deps at least once, you can now run the Chromium-specific hooks, which will download additional binaries and other things you might need: $ gclient runhooks There are some notes at the end of this document, but we make no guarantees for their accuracy. You may need to adjust the build dependencies for other distros. Once you have checked out the code, and assuming you're using Ubuntu, run build/install-build-deps.sh $. The remaining instructions assume you have switched to the src directory: $ cd src

gclient file and a directory called src in the working directory. When fetch completes, it will have created a hidden. If you've already installed the build dependencies on the machine (from another checkout, for example), you can omit the -nohooks flag and fetch will automatically execute gclient runhooks at the end. If you don't want the full repo history, you can save a lot of time by adding the -no-history flag to fetch.Įxpect the command to take 30 minutes on even a fast connection, and many hours on slower ones. Run the fetch tool from depot_tools to check out the code and its dependencies. Rather, you should use either $HOME or the absolute path: $ export PATH = "$PATH:$/depot_tools" Get the codeĬreate a chromium directory for the checkout and change to it (you can call this whatever you like and put it wherever you like, as long as the full path has no spaces): $ mkdir ~ /chromium & cd ~/ chromium When cloning depot_tools to your home directory do not use ~ on PATH, otherwise gclient runhooks will fail to run. Assuming you cloned depot_tools to /path/to/depot_tools: $ export PATH = "$PATH:/path/to/depot_tools" Install depot_toolsĬlone the depot_tools repository: $ git clone https : ///chromium/tools/depot_tools.gitĪdd depot_tools to the end of your PATH (you will probably want to put this in your ~/.bashrc or ~/.zshrc).

See this bug for additional details on this. There may be additional Docker-specific issues during compilation. If you choose to compile from within a container for whatever reason, you will need to make sure that the following tools are available: While it is not a common setup, Chromium compilation should work from within a Docker container. There are some instructions for other distros below, but they are mostly unsupported. Most development is done on Ubuntu (currently 18.04, Bionic Beaver).
