Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Building Chromium

joone edited this page Apr 16, 2013 · 17 revisions

This is a cheat sheet for building Chromium so you should read the full instructions at the link in each section.

Install deptools

The depot_tools package includes gclient, gcl, git-cl, repo, and others.

  1. Fetch depot_tools: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  2. Add depot_tools to your PATH:
 $ export PATH="$PATH":`pwd`/depot_tools

Get Chromium code using git

 $ git config --global user.name "My Name"
 $ git config --global user.email "[email protected]"
 $ git config --global core.autocrlf false
 $ git config --global core.filemode false
 $ git config --global core.deltaBaseCacheLimit 1G 

 $ mkdir ~/git/chromium
 $ cd ~/git/chromium

 $ gclient config --spec 'solutions = [{u'"'"'managed'"'"': True, u'"'"'name'"'"': u'"'"'src'"'"', u'"'"'url'"'"': u'"'"'https://chromium.googlesource.com/chromium/src.git'"'"', u'"'"'custom_deps'"'"': {}, u'"'"'deps_file'"'"': u'"'"'.DEPS.git'"'"', u'"'"'safesync_url'"'"': u'"'"''"'"', u'"'"'custom_vars'"'"': {u'"'"'webkit_rev'"'"': u'"'"''"'"'}}]'

 $ fetch blink --nosvn=True

Bootstrap notes for Ubuntu

  • Make sure your dependencies are up to date by running the install-build-deps.sh script:
 $ cd ~/git/chromium/src
 $ sudo build/install-build-deps.sh

Build chromium

 $ rm -rf out/Debug
 $ export GYP_GENERATORS='ninja'
 $ build/gyp_chromium -D component=shared_library
 $ ninja -C out/Debug chrome

Dealing with gcc warnings

By default we fail to build if there are any compiler warnings. If you're getting warnings, can't build because of that, but just want to get things done, you can specify -Dwerror= to turn that off:

Updating the code

First you need to make sure you are in the master branch.

 $ cd src
 $ git checkout master
 $ git pull  (only chromium code)

If you want to update third party tools, use gclient sync

Updating can be extremely slow with a limited number of jobs, --jobs=16 helps make it less painful.

  gclient sync --jobs=16

Running Chromium

 $ cd ~/git/chromium/src
 $ out/Debug/chrome

Contributing your patches

note: You should add your name & email into the AUTHORS file for your first patch. https://codereview.chromium.org/13818036/patch/1/2

References

Clone this wiki locally