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 17, 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'"'"''"'"'}}]'

Initial checkout

 $ fetch blink --nosvn=True

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

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:

Running Chromium

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

Contributing your patches

 $ cd ~/git/chromium/src/third_party/WebKit
 $ git branch myChange
 $ git checkout myChange
 $ vi Source/WebCore/editing/FrameSelection.cpp  (editing)
 $ git commit
 $ git cl upload 

This will open your text editor. Write your patch description as follows:

We need to change the caret color according to the lightness of the background color. 
BUG=232188
TEST=Follow the bug description.

Then, you will find suggested owners in the output message of the above command. Add the suggested owners to the Reviewers field after clicking the Edit issue button.

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