-
Notifications
You must be signed in to change notification settings - Fork 211
Building Chromium
This is a cheat sheet for building Chromium so you should read the full instructions at the link in each section.
The depot_tools package includes gclient, gcl, git-cl, repo, and others.
- Fetch depot_tools: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- Add depot_tools to your PATH:
$ export PATH="$PATH":`pwd`/depot_tools
$ 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
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
- 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
$ rm -rf out/Debug $ export GYP_GENERATORS='ninja' $ build/gyp_chromium -D component=shared_library $ ninja -C out/Debug chrome
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:
-
one-off : build/gyp_chromium -Dwerror=
-
via variable : export GYP_DEFINES="werror="
-
http://code.google.com/p/chromium/wiki/LinuxBuildInstructions#gyp_%28configuring%29
$ cd ~/git/chromium/src $ out/Debug/chrome
$ 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