-
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 of running "git cl upload". 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
You can update your patch on an already uploaded CL by running "git cl upload" again, but sometimes it create a new issue. In this case, you need to run git cl issue as follows:
$ git cl issue 14098003 (issue number) $ git cl upload
$ ninja -C ./ all_webkit DumpRenderTree $ Xvfb :4 -screen 0 1024x768x24 src/third_party/WebKit$ DISPLAY=:4 Tools/Scripts/run-webkit-tests --debug
How to debug layout test
$ gdb --args /home/joone/git/chromium/src/out/Debug/content_shell --dump-render-tree --no-sandbox --single- process fast/events/before-unload-returnValue.html