0

Update the build instructions to be consistent.

We have lots of inconsistencies between the different platforms in the
public instructions, and between the public instructions and the internal
instructions.

This CL (along with an internal one) should clean everything up.

TBR=teresam@google.com, sdy@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2526563003
Cr-Commit-Position: refs/heads/master@{#435138}
This commit is contained in:
dpranke
2016-11-29 23:47:58 -08:00
committed by Commit bot
parent fc1565e1a2
commit 0ae7cad40a
20 changed files with 1587 additions and 447 deletions

@ -1,99 +1,96 @@
# Android Build Instructions
**See also [the old version of this page](old_android_build_instructions.md).**
Google employee? See [go/building-chrome](https://goto.google.com/building-chrome) instead.
[TOC]
## Prerequisites
## System requirements
A Linux build machine capable of building [Chrome for
Linux](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions_prerequisites.md).
Other (Mac/Windows) platforms are not supported for Android.
* A 64-bit Intel machine running Linux with at least 8GB of RAM. More
than 16GB is highly recommended.
* At least 100GB of free disk space.
* You must have Git and Python installed already.
## Getting the code
Most development is done on Ubuntu. Other distros may or may not work;
see the [linux instructions](linux_build_instructions.md) for some suggestions.
First, check out and install the [depot\_tools
package](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up).
Building the Android client on Windows or Mac is not supported and doesn't work.
Then, if you have no existing checkout, create your source directory and
get the code:
## Install `depot_tools`
```shell
mkdir ~/chromium && cd ~/chromium
fetch --nohooks android # This will take 30 minutes on a fast connection
```
Clone the depot_tools repository:
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Add depot_tools to the end of your PATH (you will probably want to put this
in your ~/.bashrc or ~/.zshrc). Assuming you cloned depot_tools
to /path/to/depot_tools:
$ export PATH=$PATH:/path/to/depot_tools
## Get the code
Create 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
$ fetch --nohooks android
If you don't want the full repo history, you can save a lot of time by
adding the `--no-history` flag to fetch.
Expect the command to take 30 minutes on even a fast connection, and many
hours on slower ones.
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.
When fetch completes, it will have created a directory called `src`.
The remaining instructions assume you are now in that directory:
$ cd src
### Converting an existing Linux checkout
If you have an existing Linux checkout, you can add Android support by
appending `target_os = ['android']` to your .gclient file (in the
directory above src):
```shell
cat > .gclient <<EOF
solutions = [ ...existing stuff in here... ]
target_os = [ 'android' ] # Add this to get Android stuff checked out.
EOF
```
$ echo "target_os = [ 'android' ]" >> ../.gclient
Then run gclient sync to get the Android stuff checked out:
Then run gclient sync to pull the new Android dependencies:
```shell
gclient sync
```
gclient sync
## (Optional) Check out LKGR
(This is actually the difference between `fetch android` and `fetch chromium`).
If you want a single build of Chromium in a known good state, sync to
the LKGR ("last known good revision"). You can find it
[here](http://chromium-status.appspot.com/lkgr), and the last 100
[here](http://chromium-status.appspot.com/revisions). Run:
### Install additional build dependencies
```shell
gclient sync --nohooks -r <lkgr-sha1>
```
Once you have checked out the code, run
This is not needed for a typical developer workflow; only for one-time
builds of Chromium.
build/install-build-deps-android.sh
## Configure GN
to get all of the dependencies you need to build on Linux *plus* all of the
Android-specific dependencies (you need some of the regular Linux dependencies
because an Android build builds a bunch of the Linux tools and utilities).
Create a build directory and set the build flags with:
### Run the hooks
```shell
gn args out/Default
```
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:
You can replace out/Default with another name you choose inside the out
directory.
$ gclient runhooks
Also be aware that some scripts (e.g. tombstones.py, adb_gdb.py)
require you to set `CHROMIUM_OUTPUT_DIR=out/Default`.
*Optional*: You can also [install API keys](https://www.chromium.org/developers/how-tos/api-keys)
if you want to talk to some of the Google services, but this is not necessary
for most development and testing purposes.
This command will bring up your editor with the GN build args. In this
file add:
```
target_os = "android"
target_cpu = "arm" # (default)
is_debug = true # (default)
# Other args you may want to set:
is_component_build = true
is_clang = true
symbol_level = 1 # Faster build with fewer symbols. -g1 rather than -g2
enable_incremental_javac = true # Much faster; experimental
```
You can also specify `target_cpu` values of "x86" and "mipsel". Re-run
gn args on that directory to edit the flags in the future. See the [GN
build
configuration](https://www.chromium.org/developers/gn-build-configuration)
page for other flags you may want to set.
### Install build dependencies
Update the system packages required to build by running:
```shell
./build/install-build-deps-android.sh
```
### Configure the JDK
Make also sure that OpenJDK 1.7 is selected as default:
@ -104,13 +101,40 @@ Make also sure that OpenJDK 1.7 is selected as default:
`sudo update-alternatives --config jar`
`sudo update-alternatives --config jarsigner`
### Synchronize sub-directories.
## Setting up the Build
```shell
gclient sync
```
Chromium uses [Ninja](https://ninja-build.org) as its main build tool, and
a tool called [GN](../tools/gn/docs/quick_start.md) to generate
the .ninja files to do the build. To create a build directory configured
to build Android, run:
## Build and install the APKs
$ gn gen '--args="target_os="android"' out/Default
* You only have to do run this command once, it will self-update the build
files as needed after that.
* You can replace `out/Default` with another directory name, but we recommend
it should still be a subdirectory of `out`.
* To specify build parameters for GN builds, including release settings,
see [GN build configuration](https://www.chromium.org/developers/gn-build-configuration).
The default will be a debug component build matching the current host
operating system and CPU.
* For more info on GN, run `gn help` on the command line or read the
[quick start guide](../tools/gn/docs/quick_start.md).
Also be aware that some scripts (e.g. tombstones.py, adb_gdb.py)
require you to set `CHROMIUM_OUTPUT_DIR=out/Default`.
## Build Chromium
Build Chromium with Ninja using the command:
$ ninja -C out/Default chrome_public_apk
You can get a list of all of the other build targets from GN by running
`gn ls out/Default` from the command line. To compile one, pass to Ninja
the GN label with no preceding "//" (so for `//chrome/test:unit_tests`
use ninja -C out/Default chrome/test:unit_tests`).
## Installing and Running Chromium on a device
If the `adb_install_apk.py` script below fails, make sure aapt is in
your PATH. If not, add aapt's path to your PATH environment variable (it
@ -290,9 +314,9 @@ To uninstall:
out/Default/bin/install_chrome_public_apk_incremental -v --uninstall
```
### Miscellaneous
## Tips, tricks, and troubleshooting
#### Rebuilding libchrome.so for a particular release
### Rebuilding libchrome.so for a particular release
These instructions are only necessary for Chrome 51 and earlier.

18
docs/get_the_code.md Normal file

@ -0,0 +1,18 @@
# Get the code: check out, build, and run Chromium.
Chromium supports building on Windows, Mac and Linux host systems.
Linux is required for building Android, and a Mac is required for building iOS.
The process for building Chrome is generally the same on all platforms, but
each platform has a few quirks. In order to keep you from having to jump
all over the place, we have a self-contained page for each configuration
you might want to build:
* [Android](android_build_instructions.md)
* [Cast](cast_build_instructions.md)
* [ChromeOS](chromeos_build_instructions.md)
* [iOS](ios_build_instructions.md)
* [Linux](linux_build_instructions.md)
* [Mac](mac_build_instructions.md)
* [Windows](windows_build_instructions.md)

@ -1,52 +1,74 @@
# iOS Build Instructions
**Note:** Upstreaming of iOS code is still a work in progress. In particular,
note that **it is not currently possible to build an actual Chromium app.**
Currently, the buildable binaries are ios\_web\_shell (a minimal wrapper around
the web layer), and various unit tests.
**See also [the old version of this page](old_ios_build_instructions.md).**
## Prerequisites
Google employee? See [go/building-chrome](https://goto.google.com/building-chrome) instead.
* A Mac running 10.11+.
* [Xcode] 8.0+.
* [depot\_tools].
* The current version of the JDK (required for the closure compiler).
[TOC]
## Getting the source
## System requirements
To checkout the source, use `fetch ios` command from [depot\_tools] in a new
empty directory.
* A 64-bit Mac running 10.11+.
* [Xcode](https://developer.apple.com/xcode) 8.0+.
* The OSX 10.10 SDK. Run
ls `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs
to check whether you have it. Building with the 10.11 SDK works too, but
the releases currently use the 10.10 SDK.
* The current version of the JDK (which is required for the Closure compiler).
```shell
# You can use a different location for your checkout of Chromium on iOS
# by updating this variable. All shell snippets will refer to it.
CHROMIUM_IOS="$HOME/chromium_ios"
mkdir "$CHROMIUM_IOS"
cd "$CHROMIUM_IOS"
fetch ios
```
## Install `depot_tools`
## Setting up
Clone the depot_tools repository:
Chromium on iOS is built using the [Ninja](ninja_build.md) tool and
the [Clang](clang.md) compiler. See both of those pages for further details on
how to tune the build.
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Before you build, you may want to [install API keys](api-keys) so that
Chrome-integrated Google services work. This step is optional if you aren't
testing those features.
Add depot_tools to the end of your PATH (you will probably want to put this
in your ~/.bashrc or ~/.zshrc). Assuming you cloned depot_tools
to /path/to/depot_tools:
### Quick setup
$ export PATH=$PATH:/path/to/depot_tools
To setup the repository for building Chromium on iOS code, it is recommended
to use the `src/ios/build/tools/setup-gn.py` script that creates a Xcode
workspace configured to build the different targets for device and simulator.
## Get the code
```shell
cd "$CHROMIUM_IOS/src"
ios/build/tools/setup-gn.py
open out/build/all.xcworkspace
```
Create 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
Run the `fetch` tool from depot_tools to check out the code and its
dependencies.
$ fetch ios
(This is identical to `fetch chromium`, except that it sets `target_os=["ios"]`
in your `.gclient` file.
If you don't want the full repo history, you can save a lot of time by
adding the `--no-history` flag to fetch. Expect the command to take
30 minutes on even a fast connection, and many hours on slower ones.
When fetch completes, it will have created a directory called `src`.
The remaining instructions assume you are now in that directory:
$ cd src
*Optional*: You can also [install API keys](https://www.chromium.org/developers/how-tos/api-keys)
if you want to talk to some of the Google services, but this is not necessary
for most development and testing purposes.
## Setting up the build
Since the iOS build is a bit more complicated than a desktop build, we
provide the `ios/build/tools/setup-gn.py`, which will create four
appropriately configured build directories under `out` for Release and
Debug device and simulator builds, and generates an appropriate Xcode
workspace as well.
This script is run automatically by fetch (as part of `gclient runhooks`).
You can customize the build by editing the file `$HOME/.setup-gn` (create it
if it does not exists). Look at `src/ios/build/tools/setup-gn.config` for
@ -65,40 +87,88 @@ Note: you need to run `setup-gn.py` script every time one of the `BUILD.gn`
file is updated (either by you or after rebasing). If you forget to run it,
the list of targets and files in the Xcode solution may be stale.
### Advanced setup
You can run `gn` manually to configure the build yourself. In that case,
refer to [mac build instructions] for help on how to do that.
To build for iOS, you have to set `target_os` to `"ios"`. Please also note
that `is_component_build` is not supported when building for iOS and must
be set to `false`.
You can also follow the manual instructions on the
[mac page](mac_build_instructions.md), but make sure you set the
GN arg `target_os="ios"`.
## Running
Any target that is built and runs on the bots (see [below](#Troubleshooting))
should run successfully in a local build. As of the time of writing, this is
only ios\_web\_shell and unit test targets—see the note at the top of this
only ios_web_shell and unit test targets—see the note at the top of this
page. Check the bots periodically for updates; more targets (new components)
will come on line over time.
To run in the simulator from the command line, you can use `iossim`. For
example, to run a debug build of ios\_web\_shell:
example, to run a debug build of ios_web_shell:
```shell
out/Debug-iphonesimulator/iossim out/Debug-iphonesimulator/ios_web_shell.app
```
## Troubleshooting
## Update your checkout
If your build fails, check the iOS columns of [the Mac
waterfall](http://build.chromium.org/p/chromium.mac/console) (the last two) to
see if the bots are green. In general they should be, since failures on those
bots will close the tree.
To update an existing checkout, you can run
[Xcode]: https://developer.apple.com/xcode
[depot\_tools]: https://dev.chromium.org/developers/how-tos/depottools
[Ninja]: ninja.md
[Clang]: clang.md
[api-keys]: https://sites.google.com/a/chromium.org/dev/developers/how-tos/api-keys
[mac build instructions]: mac_build_instructions.md
$ git rebase-update
$ gclient sync
The first command updates the primary Chromium source repository and rebases
any of your local branches on top of tip-of-tree (aka the Git branch `origin/master`).
If you don't want to use this script, you can also just use `git pull` or
other common Git commands to update the repo.
The second command syncs the subrepositories to the appropriate versions and
re-runs the hooks as needed.
## Tips, tricks, and troubleshooting
If you have problems building, join us in `#chromium` on `irc.freenode.net` and
ask there. As mentioned above, be sure that the
[waterfall](http://build.chromium.org/buildbot/waterfall/) is green and the tree
is open before checking out. This will increase your chances of success.
### Improving performance of `git status`
`git status` is used frequently to determine the status of your checkout. Due
to the number of files in Chromium's checkout, `git status` performance can be
quite variable. Increasing the system's vnode cache appears to help. By
default, this command:
sysctl -a | egrep kern\..*vnodes
Outputs `kern.maxvnodes: 263168` (263168 is 257 * 1024). To increase this
setting:
sudo sysctl kern.maxvnodes=$((512*1024))
Higher values may be appropriate if you routinely move between different
Chromium checkouts. This setting will reset on reboot, the startup setting can
be set in `/etc/sysctl.conf`:
echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf
Or edit the file directly.
If your `git --version` reports 2.6 or higher, the following may also improve
performance of `git status`:
git update-index --untracked-cache
### Xcode license agreement
If you're getting the error
```
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
```
the Xcode license hasn't been accepted yet which (contrary to the message) any
user can do by running:
xcodebuild -license
Only accepting for all users of the machine requires root:
sudo xcodebuild -license

@ -0,0 +1,20 @@
# Building Chromium on Arch Linux
Generally speaking, follow the [Linux Build Instructions](linux_build_instructions.md).
However, do the following instead to install the build dependencies:
## Install the build dependencies:
Most of these packages are probably already installed since they're often used,
and the parameter --needed ensures that packages up to date are not reinstalled.
sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig \
nss alsa-lib gconf glib2 gtk2 nspr ttf-ms-fonts freetype2 cairo dbus \
libgnome-keyring
For the optional packages on Arch Linux:
* php-cgi is provided with pacman
* wdiff is not in the main repository but dwdiff is. You can get wdiff in
AUR/yaourt
* sun-java6-fonts do not seem to be in main repository or AUR.

@ -1,120 +1,156 @@
# Linux-specific build instructions
# Checking out and building Chromium on Linux
## Common checkout instructions
**See also [the old version of this page](old_linux_build_instructions.md).**
This page covers Linux-specific setup and configuration. The
[general checkout
instructions](http://dev.chromium.org/developers/how-tos/get-the-code) cover
installing depot tools and checking out the code via git.
Google employee? See [go/building-chrome](https://goto.google.com/building-chrome) instead.
## Overview
[TOC]
Due its complexity, Chromium uses a set of custom tools to check out and build
rather than configure/make like most projects. You _must_ use gclient and
ninja, and there is no "install" step provided.
## System requirements
### System requirements
* A 64-bit Intel machine with at least 8GB of RAM. More than 16GB is highly
recommended.
* At least 100GB of free disk space.
* You must have Git and Python installed already.
* **64-bits**: x86 builds are not supported on Linux.
* **Memory**: >16GB is highly recommended.
* **Disk space**: Expect a full checkout and build to take nearly 100GB.
* **Distribution**: You should be able to build Chromium on any reasonably modern Linux
distribution, but there are a lot of distributions and we sometimes break
things on one or another. Internally, our development platform has been a
variant of Ubuntu 14.04 (Trusty Tahr); we expect you will have the most
luck on this platform.
Most development is done on Ubuntu (currently 14.04, Trusty Tahr). There are
some instructions for other distros below, but they are mostly unsupported.
## Software setup
## Install `depot_tools`
Non-Ubuntu distributions are not officially supported for building and the
instructions below might be outdated.
Clone the depot_tools repository:
### Ubuntu
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Once you have checked out the code, run
[build/install-build-deps.sh](/build/install-build-deps.sh) The script only
supports current releases as listed on https://wiki.ubuntu.com/Releases.
This script is used to set up the canonical builders, and as such is the most
up to date reference for the required prerequisites.
Add depot_tools to the end of your PATH (you will probably want to put this
in your ~/.bashrc or ~/.zshrc). Assuming you cloned depot_tools
to /path/to/depot_tools:
### Debian
$ export PATH=$PATH:/path/to/depot_tools
Follow the Ubuntu instructions above. If you want to install the build-deps
manually, note that the original packages are for Ubuntu. Here are the Debian
equivalents:
## Get the code
* libexpat-dev -> libexpat1-dev
* freetype-dev -> libfreetype6-dev
* libbzip2-dev -> libbz2-dev
* libcupsys2-dev -> libcups2-dev
Create 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
Additionally, if you're building Chromium components for Android, you'll need to
install the package: lib32z1
Run the `fetch` tool from depot_tools to check out the code and its
dependencies.
### openSUSE
$ fetch --nohooks chromium
For openSUSE 11.0 and later, see
[Linux openSUSE Build Instructions](linux_open_suse_build_instructions.md).
If you don't want the full repo history, you can save a lot of time by
adding the `--no-history` flag to fetch.
### Fedora
Expect the command to take 30 minutes on even a fast connection, and many
hours on slower ones.
Recent systems:
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.
su -c 'yum install git python bzip2 tar pkgconfig atk-devel alsa-lib-devel \
bison binutils brlapi-devel bluez-libs-devel bzip2-devel cairo-devel \
cups-devel dbus-devel dbus-glib-devel expat-devel fontconfig-devel \
freetype-devel gcc-c++ GConf2-devel glib2-devel glibc.i686 gperf \
glib2-devel gtk2-devel gtk3-devel java-1.*.0-openjdk-devel libatomic \
libcap-devel libffi-devel libgcc.i686 libgnome-keyring-devel libjpeg-devel \
libstdc++.i686 libX11-devel libXScrnSaver-devel libXtst-devel \
libxkbcommon-x11-devel ncurses-compat-libs nspr-devel nss-devel pam-devel \
pango-devel pciutils-devel pulseaudio-libs-devel zlib.i686 httpd mod_ssl \
php php-cli python-psutil wdiff'
When fetch completes, it will have created a directory called `src`.
The remaining instructions assume you are now in that directory:
The msttcorefonts packages can be obtained by following the instructions
present [here](http://www.fedorafaq.org/#installfonts). For the optional
packages:
$ cd src
* php-cgi is provided by the php-cli package
* sun-java6-fonts doesn't exist in Fedora repositories, needs investigating
### Install additional build dependencies
### Arch Linux
Once you have checked out the code, and assuming you're using Ubuntu, run
[build/install-build-deps.sh](/build/install-build-deps.sh)
Most of these packages are probably already installed since they're often used,
and the parameter --needed ensures that packages up to date are not reinstalled.
Here are some instructions for what to do instead for
sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig \
nss alsa-lib gconf glib2 gtk2 nspr ttf-ms-fonts freetype2 cairo dbus \
libgnome-keyring
* [Debian](linux_debian_build_instructions.md)
* [Fedora](linux_fedora_build_instructions.md)
* [Arch Linux](linux_arch_build_instructions.md)
* [Open SUSE](linux_open_suse_build_instrctions.md)
* [Mandriva](linux_mandriva_build_instrctions.md)
For the optional packages on Arch Linux:
For Gentoo, you can just run `emerge www-client/chromium`.
* php-cgi is provided with pacman
* wdiff is not in the main repository but dwdiff is. You can get wdiff in
AUR/yaourt
* sun-java6-fonts do not seem to be in main repository or AUR.
### Run the hooks
### Mandriva
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:
urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel \
lib64GConf2-devel lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel \
lib64pango1.0-devel lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python \
perl bison flex subversion gperf
$ gclient runhooks
* msttcorefonts are not available, you will need to build your own (see
instructions, not hard to do, see
[mandriva_msttcorefonts.md](mandriva_msttcorefonts.md)) or use drakfont to
import the fonts from a windows installation
* These packages are for 64 bit, to download the 32 bit packages,
substitute lib64 with lib
* Some of these packages might not be explicitly necessary as they come as
dependencies, there is no harm in including them however.
*Optional*: You can also [install API keys](https://www.chromium.org/developers/how-tos/api-keys)
if you want to talk to some of the Google services, but this is not necessary
for most development and testing purposes.
### Gentoo
## Seting up the Build
emerge www-client/chromium
Chromium uses [Ninja](https://ninja-build.org) as its main build tool, and
a tool called [GN](../tools/gn/docs/quick_start.md) to generate
the .ninja files to do the build. To create a build directory, run:
## Troubleshooting
$ gn gen out/Default
* You only have to do run this command once, it will self-update the build
files as needed after that.
* You can replace `out/Default` with another directory name, but we recommend
it should still be a subdirectory of `out`.
* To specify build parameters for GN builds, including release settings,
see [GN build configuration](https://www.chromium.org/developers/gn-build-configuration).
The default will be a debug component build matching the current host
operating system and CPU.
* For more info on GN, run `gn help` on the command line or read the
[quick start guide](../tools/gn/docs/quick_start.md).
### Faster builds
See [faster builds on Linux](linux_faster_builds.md) for various tips and
settings that may speed up your build.
## Build Chromium
Build Chromium (the "chrome" target) with Ninja using the command:
$ ninja -C out/Default chrome
You can get a list of all of the other build targets from GN by running
`gn ls out/Default` from the command line. To compile one, pass to Ninja
the GN label with no preceding "//" (so for `//chrome/test:unit_tests`
use ninja -C out/Default chrome/test:unit_tests`).
## Run Chromium
Once it is built, you can simply run the browser:
$ out/Default/chrome
## Running test targets
You can run the tests in the same way. You can also limit which tests are
run using the `--gtest_filter` arg, e.g.:
$ ninja -C out/Default unit_tests --gtest_filter="PushClientTest.*"
You can find out more about GoogleTest at its
[GitHub page](https://github.com/google/googletest).
## Update your checkout
To update an existing checkout, you can run
$ git rebase-update
$ gclient sync
The first command updates the primary Chromium source repository and rebases
any of your local branches on top of tip-of-tree (aka the Git branch `origin/master`).
If you don't want to use this script, you can also just use `git pull` or
other common Git commands to update the repo.
The second command syncs the subrepositories to the appropriate versions and
re-runs the hooks as needed.
## Tips, tricks, and troubleshooting
### Linker Crashes
@ -140,21 +176,18 @@ setting):
* Build in component mode (this is for developers only, it will be slower and
may have broken functionality). `is_component_build = true`
## More links
### More links
* [Faster builds on Linux](linux_faster_builds.md)
* Information about [building with Clang](clang.md).
* You may want to
[use a chroot](using_a_linux_chroot.md) to
isolate yourself from versioning or packaging conflicts (or to run the
layout tests).
* You may want to [use a chroot](using_a_linux_chroot.md) to
isolate yourself from versioning or packaging conflicts.
* Cross-compiling for ARM? See [LinuxChromiumArm](linux_chromium_arm.md).
* Want to use Eclipse as your IDE? See
[LinuxEclipseDev](linux_eclipse_dev.md).
* Built version as Default Browser? See
* Want to use your built version as your default browser? See
[LinuxDevBuildAsDefaultBrowser](linux_dev_build_as_default_browser.md).
## Next Steps
### Next Steps
If you want to contribute to the effort toward a Chromium-based browser for
Linux, please check out the [Linux Development page](linux_development.md) for

@ -0,0 +1,12 @@
# Building Chromium on Debian
Generally speaking, follow the [Linux Build Instructions](linux_build_instructions.md).
However, you may need to update the package names in `install-build-deps.sh`:
* libexpat-dev -> libexpat1-dev
* freetype-dev -> libfreetype6-dev
* libbzip2-dev -> libbz2-dev
* libcupsys2-dev -> libcups2-dev
Additionally, if you're building Chromium components for Android, you'll need to
install the package: lib32z1

@ -0,0 +1,25 @@
# Building Chromium on Fedora
Generally speaking, follow the [Linux Build Instructions](linux_build_instructions.md).
However, do the following instead to install the build dependenies:
Generally, follow the main [Linux Build instructions], but instead of
running `build/install-build-deps.sh`, run:
su -c 'yum install git python bzip2 tar pkgconfig atk-devel alsa-lib-devel \
bison binutils brlapi-devel bluez-libs-devel bzip2-devel cairo-devel \
cups-devel dbus-devel dbus-glib-devel expat-devel fontconfig-devel \
freetype-devel gcc-c++ GConf2-devel glib2-devel glibc.i686 gperf \
glib2-devel gtk2-devel gtk3-devel java-1.*.0-openjdk-devel libatomic \
libcap-devel libffi-devel libgcc.i686 libgnome-keyring-devel libjpeg-devel \
libstdc++.i686 libX11-devel libXScrnSaver-devel libXtst-devel \
libxkbcommon-x11-devel ncurses-compat-libs nspr-devel nss-devel pam-devel \
pango-devel pciutils-devel pulseaudio-libs-devel zlib.i686 httpd mod_ssl \
php php-cli python-psutil wdiff'
The msttcorefonts packages can be obtained by following the instructions
present [here](http://www.fedorafaq.org/#installfonts). For the optional
packages:
* php-cgi is provided by the php-cli package
* sun-java6-fonts doesn't exist in Fedora repositories, needs investigating

@ -0,0 +1,20 @@
# Building Chromium on Mandriva
Generally speaking, follow the [Linux Build Instructions](linux_build_instructions.md).
However, do the following instead to install the build dependencies:
## Install the build dependencies:
urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel \
lib64GConf2-devel lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel \
lib64pango1.0-devel lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python \
perl bison flex subversion gperf
* msttcorefonts are not available, you will need to build your own (see
instructions, not hard to do, see
[mandriva_msttcorefonts.md](mandriva_msttcorefonts.md)) or use drakfont to
import the fonts from a windows installation
* These packages are for 64 bit, to download the 32 bit packages,
substitute lib64 with lib
* Some of these packages might not be explicitly necessary as they come as
dependencies, there is no harm in including them however.

@ -1,10 +1,9 @@
# Linux Open SUSE Build Instructions
# Building Chromium on openSUSE
This page includes some instruction to build Chromium on openSUSE 11.1 and 11.0.
Before reading this page you need to learn the
[Linux Build Instructions](linux_build_instructions.md).
Generally speaking, follow the [Linux Build Instructions](linux_build_instructions.md).
However, do the following instead to install the build dependencies:
## How to Install Dependencies:
## Install the build dependencies:
Use zypper command to install dependencies:
@ -70,9 +69,3 @@ sudo mkdir -p /usr/share/fonts/truetype/ttf-lucida
sudo find /usr/lib*/jvm/java-1.6.*-sun-*/jre/lib -iname '*.ttf' -print \
-exec ln -s {} /usr/share/fonts/truetype/ttf-lucida \;
```
## Building the software
Please refer to the [Linux Build Instructions](linux_build_instructions.md).
Please update this page if you use different steps.

@ -1,57 +1,82 @@
# Mac Build Instructions
Google employee? See [go/building-chrome](https://goto.google.com/building-chrome) instead.
[TOC]
Google employee? See [go/building-chrome-mac](https://goto.google.com/building-chrome-mac) for extra tips.
## System requirements
## Prerequisites
* A Mac running 10.9+.
* A 64-bit Mac running 10.9+.
* [Xcode](https://developer.apple.com/xcode) 7.3+.
* [depot\_tools](http://dev.chromium.org/developers/how-tos/depottools).
* The OSX 10.10 SDK. Run
```
ls `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs
```
to check whether you have it. Building with the 10.11 SDK works too, but
the releases currently use the 10.10 SDK.
* Git v
* Python 2.7.x.
## Getting the code
## Install `depot_tools`
[Check out the source code](https://www.chromium.org/developers/how-tos/get-the-code)
using Git.
Clone the depot_tools repository:
Before checking out, go to the
[waterfall](http://build.chromium.org/buildbot/waterfall/) and check that the
source tree is open (to avoid pulling a broken tree).
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
The path to the build directory should not contain spaces (e.g. not
`~/Mac OS X/chromium`), as this will cause the build to fail. This includes your
drive name, the default "Macintosh HD2" for a second drive has a space.
Add depot_tools to the end of your PATH (you will probably want to put this
in your ~/.bashrc or ~/.zshrc). Assuming you cloned depot_tools
to /path/to/depot_tools:
$ export PATH=$PATH:/path/to/depot_tools
## Get the code
Create 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
Run the `fetch` tool from depot_tools to check out the code and its
dependencies.
$ fetch chromium
If you don't want the full repo history, you can save a lot of time by
adding the `--no-history` flag to fetch. Expect the command to take
30 minutes on even a fast connection, and many hours on slower ones.
When fetch completes, it will have created a directory called `src`.
The remaining instructions assume you are now in that directory:
$ cd src
*Optional*: You can also [install API keys](https://www.chromium.org/developers/how-tos/api-keys)
if you want to talk to some of the Google services, but this is not necessary
for most development and testing purposes.
## Building
Chromium on OS X is built using the [Ninja](ninja_build.md) tool and
the [Clang](clang.md) compiler. See both of those pages for further details on
how to tune the build.
Chromium uses [Ninja](https://ninja-build.org) as its main build tool, and
a tool called [GN](../tools/gn/docs/quick_start.md) to generate
the .ninja files to do the build. To create a build directory:
Run
$ gn gen out/Default
gn gen out/gn
* You only have to do run this command once, it will self-update the build
files as needed after that.
* You can replace `out/Default` with another directory name, but we recommend
it should still be a subdirectory of `out`.
* To specify build parameters for GN builds, including release settings,
see [GN build configuration](https://www.chromium.org/developers/gn-build-configuration).
The default will be a debug component build matching the current host
operating system and CPU.
* For more info on GN, run `gn help` on the command line or read the
[quick start guide](../tools/gn/docs/quick_start.md).
to generate build files (replace "gn" in "out/gn" with whatever you like), and
then run
ninja -C out/gn chrome
to build. You can edit out/gn/args.gn to configure the build.
Before you build, you may want to
[install API keys](https://sites.google.com/a/chromium.org/dev/developers/how-tos/api-keys)
so that Chrome-integrated Google services work. This step is optional if you
aren't testing those features.
## Faster builds
### Faster builds
Full rebuilds are about the same speed in Debug and Release, but linking is a
lot faster in Release builds.
@ -72,7 +97,7 @@ that opens less quickly. Component builds work in both debug and release.
Put
symbol_level = 1
symbol_level = 0
in your args.gn to disable debug symbols altogether. This makes both full
rebuilds and linking faster (at the cost of not getting symbolized backtraces
@ -80,36 +105,21 @@ in gdb).
You might also want to [install ccache](ccache_mac.md) to speed up the build.
## Running
## Run Chromium
All build output is located in the `out` directory (in the example above,
`~/chromium/src/out`). You can find the applications at
`gn/Content Shell.app` and `gn/Chromium.app`.
Once it is built, you can simply run the browser:
## Unit Tests
$ out/Default/chrome
We have several unit test targets that build, and tests that run and pass. A
small subset of these is:
## Running test targets
* `unit_tests` from `chrome/chrome.gyp`
* `base_unittests` from `base/base.gyp`
* `net_unittests` from `net/net.gyp`
* `url_unittests` from `url/url.gyp`
You can run the tests in the same way. You can also limit which tests are
run using the `--gtest_filter` arg, e.g.:
When these tests are built, you will find them in the `out/gn`
directory. You can run them from the command line:
$ ninja -C out/Default unit_tests --gtest_filter="PushClientTest.*"
~/chromium/src/out/gn/unit_tests
## Coding
According to the
[Chromium style guide](http://dev.chromium.org/developers/coding-style) code is
[not allowed to have whitespace on the ends of lines](https://google.github.io/styleguide/cppguide.html#Horizontal_Whitespace).
Run `git cl format` after committing to your local branch and before uploading
to clang-format your code.
You can find out more about GoogleTest at its
[GitHub page](https://github.com/google/googletest).
## Debugging
@ -120,13 +130,24 @@ command line, that is possible without building in Xcode. See
[Debugging in Xcode](http://www.chromium.org/developers/how-tos/debugging-on-os-x/building-with-ninja-debugging-with-xcode)
for information on how.
## Contributing
## Update your checkout
Once youre comfortable with building Chromium, check out
[Contributing Code](http://dev.chromium.org/developers/contributing-code) for
information about writing code for Chromium and contributing it.
To update an existing checkout, you can run
## Using Xcode-Ninja Hybrid
$ git rebase-update
$ gclient sync
The first command updates the primary Chromium source repository and rebases
any of your local branches on top of tip-of-tree (aka the Git branch `origin/master`).
If you don't want to use this script, you can also just use `git pull` or
other common Git commands to update the repo.
The second command syncs the subrepositories to the appropriate versions and
re-runs the hooks as needed.
## Tips, tricks, and troubleshooting
### Using Xcode-Ninja Hybrid
While using Xcode is unsupported, gn supports a hybrid approach of using ninja
for building, but Xcode for editing and driving compilation. Xcode is still
@ -161,7 +182,7 @@ ask there. As mentioned above, be sure that the
[waterfall](http://build.chromium.org/buildbot/waterfall/) is green and the tree
is open before checking out. This will increase your chances of success.
## Improving performance of `git status`
### Improving performance of `git status`
`git status` is used frequently to determine the status of your checkout. Due
to the number of files in Chromium's checkout, `git status` performance can be
@ -188,7 +209,7 @@ performance of `git status`:
git update-index --untracked-cache
## Xcode license agreement
### Xcode license agreement
If you're getting the error

@ -1,102 +0,0 @@
# Ninja Build
Ninja is a build system written with the specific goal of improving the
edit-compile cycle time. It is used by default everywhere except when building
for iOS.
Ninja behaves very similar to Make -- the major feature is that it starts
building files nearly instantly. (It has a number of minor user interface
improvements to make as well.)
Read more about Ninja at [the Ninja home page](https://ninja-build.org/).
## Using it
### Configure your system to use Ninja
#### Install
Ninja is included in `depot_tools` so there's nothing to install.
## Build instructions
To build Chrome:
cd /path/to/chrome/src
ninja -C out/Debug chrome
Specify `out/Release` for a release build. I recommend setting up an alias so
that you don't need to type out that build directory path.
If you want to build all targets, use `ninja -C out/Debug all`. It's faster to
build only the target you're working on, like `chrome` or `unit_tests`.
## Android
Identical to Linux, just make sure `OS=android` is in your `GYP_DEFINES`. You
want to build one of the apk targets, e.g. `content_shell_apk`.
## Windows
Similar to Linux. It uses MSVS's `cl.exe`, `link.exe`, etc. so you still need to
have VS installed. To use it, open `cmd.exe`, go to your chrome checkout, and
run:
set GYP_DEFINES=component=shared_library
python build\gyp_chromium
ninja -C out\Debug chrome.exe
`component=shared_library` is optional but recommended for faster links.
You can also set `GYP_GENERATORS=ninja,msvs-ninja` to get both VS projects
generated if you want to use VS just to browse/edit (but then gyp takes twice as
long to run).
If you're using Express or the Windows SDK by itself (rather than using a Visual
Studio install), you'll need to run from a vcvarsall command prompt.
### Debugging
Miss VS for debugging?
```
devenv.com /debugexe chrome.exe --my-great-args "go here" --single-process etc
```
Miss Xcode for debugging? Read
http://dev.chromium.org/developers/debugging-on-os-x/building-with-ninja-debugging-with-xcode
### Without Visual Studio
That is, building with just the WinDDK. This is documented in the
[regular build instructions](http://dev.chromium.org/developers/how-tos/build-instructions-windows#TOC-Setting-up-the-environment-for-building-with-Visual-C-2010-Express-or-Windows-7.1-SDK).
## Tweaks
### Building through errors
Pass a flag like `-k3` to make Ninja build until it hits three errors instead of
stopping at the first.
### Parallelism
Pass a flag like `-j8` to use 8 parallel processes, or `-j1` to compile just one
at a time (helpful if you're getting weird compiler errors). By default Ninja
tries to use all your processors.
### More options
There are more options. Run `ninja --help` to see them all.
### Custom build configs
You can write a specific build config to a specific output directory via the
`-G` flags to gyp. Here's an example from jamesr:
`build/gyp_chromium -Gconfig=Release -Goutput_dir=out_profiling -Dprofiling=1
-Dlinux_fpic=0`
## Bugs
If you encounter any problems, please file a bug at http://crbug.com/new with
label `ninja` and cc `thakis@` or `scottmg@`. Assume that it is a bug in Ninja
before you bother anyone about e.g. link problems.

@ -0,0 +1,312 @@
# Android Build Instructions
**Generally, this page is obsolete and you should look at
[the new page instead](android_build_instructions.md).**
[TOC]
## Prerequisites
A Linux build machine capable of building [Chrome for
Linux](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions_prerequisites.md).
Other (Mac/Windows) platforms are not supported for Android.
## Getting the code
First, check out and install the [depot\_tools
package](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up).
Then, if you have no existing checkout, create your source directory and
get the code:
```shell
mkdir ~/chromium && cd ~/chromium
fetch --nohooks android # This will take 30 minutes on a fast connection
```
If you have an existing Linux checkout, you can add Android support by
appending `target_os = ['android']` to your .gclient file (in the
directory above src):
```shell
cat > .gclient <<EOF
solutions = [ ...existing stuff in here... ]
target_os = [ 'android' ] # Add this to get Android stuff checked out.
EOF
```
Then run gclient sync to get the Android stuff checked out:
```shell
gclient sync
```
## (Optional) Check out LKGR
If you want a single build of Chromium in a known good state, sync to
the LKGR ("last known good revision"). You can find it
[here](http://chromium-status.appspot.com/lkgr), and the last 100
[here](http://chromium-status.appspot.com/revisions). Run:
```shell
gclient sync --nohooks -r <lkgr-sha1>
```
This is not needed for a typical developer workflow; only for one-time
builds of Chromium.
## Configure GN
Create a build directory and set the build flags with:
```shell
gn args out/Default
```
You can replace out/Default with another name you choose inside the out
directory.
Also be aware that some scripts (e.g. tombstones.py, adb_gdb.py)
require you to set `CHROMIUM_OUTPUT_DIR=out/Default`.
This command will bring up your editor with the GN build args. In this
file add:
```
target_os = "android"
target_cpu = "arm" # (default)
is_debug = true # (default)
# Other args you may want to set:
is_component_build = true
is_clang = true
symbol_level = 1 # Faster build with fewer symbols. -g1 rather than -g2
enable_incremental_javac = true # Much faster; experimental
```
You can also specify `target_cpu` values of "x86" and "mipsel". Re-run
gn args on that directory to edit the flags in the future. See the [GN
build
configuration](https://www.chromium.org/developers/gn-build-configuration)
page for other flags you may want to set.
### Install build dependencies
Update the system packages required to build by running:
```shell
./build/install-build-deps-android.sh
```
Make also sure that OpenJDK 1.7 is selected as default:
`sudo update-alternatives --config javac`
`sudo update-alternatives --config java`
`sudo update-alternatives --config javaws`
`sudo update-alternatives --config javap`
`sudo update-alternatives --config jar`
`sudo update-alternatives --config jarsigner`
### Synchronize sub-directories.
```shell
gclient sync
```
## Build and install the APKs
If the `adb_install_apk.py` script below fails, make sure aapt is in
your PATH. If not, add aapt's path to your PATH environment variable (it
should be
`/path/to/src/third_party/android_tools/sdk/build-tools/{latest_version}/`).
Prepare the environment:
```shell
. build/android/envsetup.sh
```
### Plug in your Android device
Make sure your Android device is plugged in via USB, and USB Debugging
is enabled.
To enable USB Debugging:
* Navigate to Settings \> About Phone \> Build number
* Click 'Build number' 7 times
* Now navigate back to Settings \> Developer Options
* Enable 'USB Debugging' and follow the prompts
You may also be prompted to allow access to your PC once your device is
plugged in.
You can check if the device is connected by running:
```shell
third_party/android_tools/sdk/platform-tools/adb devices
```
Which prints a list of connected devices. If not connected, try
unplugging and reattaching your device.
### Build the full browser
```shell
ninja -C out/Release chrome_public_apk
```
And deploy it to your Android device:
```shell
CHROMIUM_OUTPUT_DIR=$gndir build/android/adb_install_apk.py $gndir/apks/ChromePublic.apk # for gn.
```
The app will appear on the device as "Chromium".
### Build Content shell
Wraps the content module (but not the /chrome embedder). See
[http://www.chromium.org/developers/content-module](http://www.chromium.org/developers/content-module)
for details on the content module and content shell.
```shell
ninja -C out/Release content_shell_apk
build/android/adb_install_apk.py out/Release/apks/ContentShell.apk
```
this will build and install an Android apk under
`out/Release/apks/ContentShell.apk`. (Where `Release` is the name of your build
directory.)
If you use custom out dir instead of standard out/ dir, use
CHROMIUM_OUT_DIR env.
```shell
export CHROMIUM_OUT_DIR=out_android
```
### Build WebView shell
[Android WebView](http://developer.android.com/reference/android/webkit/WebView.html)
is a system framework component. Since Android KitKat, it is implemented using
Chromium code (based off the [content module](http://dev.chromium.org/developers/content-module)).
It is possible to test modifications to WebView using a simple test shell. The
WebView shell is a view with a URL bar at the top (see [code](https://code.google.com/p/chromium/codesearch#chromium/src/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java))
and is **independent** of the WebView **implementation in the Android system** (
the WebView shell is essentially a standalone unbundled app).
As drawback, the shell runs in non-production rendering mode only.
```shell
ninja -C out/Release android_webview_apk
build/android/adb_install_apk.py out/Release/apks/AndroidWebView.apk
```
If, instead, you want to build the complete Android WebView framework component and test the effect of your chromium changes in other Android app using the WebView, you should follow the [Android AOSP + chromium WebView instructions](http://www.chromium.org/developers/how-tos/build-instructions-android-webview)
### Running
Set [command line flags](https://www.chromium.org/developers/how-tos/run-chromium-with-flags) if necessary.
For Content shell:
```shell
build/android/adb_run_content_shell http://example.com
```
For Chrome public:
```shell
build/android/adb_run_chrome_public http://example.com
```
For Android WebView shell:
```shell
build/android/adb_run_android_webview_shell http://example.com
```
### Logging and debugging
Logging is often the easiest way to understand code flow. In C++ you can print
log statements using the LOG macro or printf(). In Java, you can print log
statements using [android.util.Log](http://developer.android.com/reference/android/util/Log.html):
`Log.d("sometag", "Reticulating splines progress = " + progress);`
You can see these log statements using adb logcat:
```shell
adb logcat...01-14 11:08:53.373 22693 23070 D sometag: Reticulating splines progress = 0.99
```
You can debug Java or C++ code. To debug C++ code, use one of the
following commands:
```shell
build/android/adb_gdb_content_shell
build/android/adb_gdb_chrome_public
build/android/adb_gdb_android_webview_shell http://example.com
```
See [Debugging Chromium on Android](https://www.chromium.org/developers/how-tos/debugging-on-android)
for more on debugging, including how to debug Java code.
### Testing
For information on running tests, see [android\_test\_instructions.md](https://chromium.googlesource.com/chromium/src/+/master/docs/android_test_instructions.md).
### Faster Edit/Deploy (GN only)
GN's "incremental install" uses reflection and side-loading to speed up the edit
& deploy cycle (normally < 10 seconds).
* Make sure to set` is_component_build = true `in your GN args
* All apk targets have \*`_incremental` targets defined (e.g.
`chrome_public_apk_incremental`)
Here's an example:
```shell
ninja -C out/Default chrome_public_apk_incremental
out/Default/bin/install_chrome_public_apk_incremental -v
```
For gunit tests (note that run_*_incremental automatically add
--fast-local-dev when calling test\_runner.py):
```shell
ninja -C out/Default base_unittests_incremental
out/Default/bin/run_base_unittests_incremental
```
For instrumentation tests:
```shell
ninja -C out/Default chrome_public_test_apk_incremental
out/Default/bin/run_chrome_public_test_apk_incremental
```
To uninstall:
```shell
out/Default/bin/install_chrome_public_apk_incremental -v --uninstall
```
### Miscellaneous
#### Rebuilding libchrome.so for a particular release
These instructions are only necessary for Chrome 51 and earlier.
In the case where you want to modify the native code for an existing
release of Chrome for Android (v25+) you can do the following steps.
Note that in order to get your changes into the official release, you'll
need to send your change for a codereview using the regular process for
committing code to chromium.
1. Open Chrome on your Android device and visit chrome://version
2. Copy down the id listed next to "Build ID:"
3. Go to
[http://storage.googleapis.com/chrome-browser-components/BUILD\_ID\_FROM\_STEP\_2/index.html](http://storage.googleapis.com/chrome-browser-components/BUILD_ID_FROM_STEP_2/index.html)
4. Download the listed files and follow the steps in the README.

@ -0,0 +1,107 @@
# iOS Build Instructions
**Generally, this page is obsolete and you should look at
[the new page instead](ios_build_instructions.md).**
**Note:** Upstreaming of iOS code is still a work in progress. In particular,
note that **it is not currently possible to build an actual Chromium app.**
Currently, the buildable binaries are ios\_web\_shell (a minimal wrapper around
the web layer), and various unit tests.
## Prerequisites
* A Mac running 10.11+.
* [Xcode] 8.0+.
* [depot\_tools].
* The current version of the JDK (required for the closure compiler).
## Getting the source
To checkout the source, use `fetch ios` command from [depot\_tools] in a new
empty directory.
```shell
# You can use a different location for your checkout of Chromium on iOS
# by updating this variable. All shell snippets will refer to it.
CHROMIUM_IOS="$HOME/chromium_ios"
mkdir "$CHROMIUM_IOS"
cd "$CHROMIUM_IOS"
fetch ios
```
## Setting up
Chromium on iOS is built using the [Ninja](ninja_build.md) tool and
the [Clang](clang.md) compiler. See both of those pages for further details on
how to tune the build.
Before you build, you may want to [install API keys](api-keys) so that
Chrome-integrated Google services work. This step is optional if you aren't
testing those features.
### Quick setup
To setup the repository for building Chromium on iOS code, it is recommended
to use the `src/ios/build/tools/setup-gn.py` script that creates a Xcode
workspace configured to build the different targets for device and simulator.
```shell
cd "$CHROMIUM_IOS/src"
ios/build/tools/setup-gn.py
open out/build/all.xcworkspace
```
You can customize the build by editing the file `$HOME/.setup-gn` (create it
if it does not exists). Look at `src/ios/build/tools/setup-gn.config` for
available configuration options.
From this point, you can either build from Xcode or from the command-line
using `ninja`. The script `setup-gn.py` creates sub-directories named
`out/${configuration}-${platform}`, so for a `Debug` build for simulator
use:
```shell
ninja -C out/Debug-iphonesimulator gn_all
```
Note: you need to run `setup-gn.py` script every time one of the `BUILD.gn`
file is updated (either by you or after rebasing). If you forget to run it,
the list of targets and files in the Xcode solution may be stale.
### Advanced setup
You can run `gn` manually to configure the build yourself. In that case,
refer to [mac build instructions] for help on how to do that.
To build for iOS, you have to set `target_os` to `"ios"`. Please also note
that `is_component_build` is not supported when building for iOS and must
be set to `false`.
## Running
Any target that is built and runs on the bots (see [below](#Troubleshooting))
should run successfully in a local build. As of the time of writing, this is
only ios\_web\_shell and unit test targets—see the note at the top of this
page. Check the bots periodically for updates; more targets (new components)
will come on line over time.
To run in the simulator from the command line, you can use `iossim`. For
example, to run a debug build of ios\_web\_shell:
```shell
out/Debug-iphonesimulator/iossim out/Debug-iphonesimulator/ios_web_shell.app
```
## Troubleshooting
If your build fails, check the iOS columns of [the Mac
waterfall](http://build.chromium.org/p/chromium.mac/console) (the last two) to
see if the bots are green. In general they should be, since failures on those
bots will close the tree.
[Xcode]: https://developer.apple.com/xcode
[depot\_tools]: https://dev.chromium.org/developers/how-tos/depottools
[Ninja]: ninja.md
[Clang]: clang.md
[api-keys]: https://sites.google.com/a/chromium.org/dev/developers/how-tos/api-keys
[mac build instructions]: mac_build_instructions.md

@ -0,0 +1,161 @@
# Linux-specific build instructions
## Common checkout instructions
This page covers Linux-specific setup and configuration. The
[general checkout
instructions](http://dev.chromium.org/developers/how-tos/get-the-code) cover
installing depot tools and checking out the code via git.
## Overview
Due its complexity, Chromium uses a set of custom tools to check out and build
rather than configure/make like most projects. You _must_ use gclient and
ninja, and there is no "install" step provided.
### System requirements
* **64-bits**: x86 builds are not supported on Linux.
* **Memory**: >16GB is highly recommended.
* **Disk space**: Expect a full checkout and build to take nearly 100GB.
* **Distribution**: You should be able to build Chromium on any reasonably modern Linux
distribution, but there are a lot of distributions and we sometimes break
things on one or another. Internally, our development platform has been a
variant of Ubuntu 14.04 (Trusty Tahr); we expect you will have the most
luck on this platform.
## Software setup
Non-Ubuntu distributions are not officially supported for building and the
instructions below might be outdated.
### Ubuntu
Once you have checked out the code, run
[build/install-build-deps.sh](/build/install-build-deps.sh) The script only
supports current releases as listed on https://wiki.ubuntu.com/Releases.
This script is used to set up the canonical builders, and as such is the most
up to date reference for the required prerequisites.
### Debian
Follow the Ubuntu instructions above. If you want to install the build-deps
manually, note that the original packages are for Ubuntu. Here are the Debian
equivalents:
* libexpat-dev -> libexpat1-dev
* freetype-dev -> libfreetype6-dev
* libbzip2-dev -> libbz2-dev
* libcupsys2-dev -> libcups2-dev
Additionally, if you're building Chromium components for Android, you'll need to
install the package: lib32z1
### openSUSE
For openSUSE 11.0 and later, see
[Linux openSUSE Build Instructions](linux_open_suse_build_instructions.md).
### Fedora
Recent systems:
su -c 'yum install git python bzip2 tar pkgconfig atk-devel alsa-lib-devel \
bison binutils brlapi-devel bluez-libs-devel bzip2-devel cairo-devel \
cups-devel dbus-devel dbus-glib-devel expat-devel fontconfig-devel \
freetype-devel gcc-c++ GConf2-devel glib2-devel glibc.i686 gperf \
glib2-devel gtk2-devel gtk3-devel java-1.*.0-openjdk-devel libatomic \
libcap-devel libffi-devel libgcc.i686 libgnome-keyring-devel libjpeg-devel \
libstdc++.i686 libX11-devel libXScrnSaver-devel libXtst-devel \
libxkbcommon-x11-devel ncurses-compat-libs nspr-devel nss-devel pam-devel \
pango-devel pciutils-devel pulseaudio-libs-devel zlib.i686 httpd mod_ssl \
php php-cli python-psutil wdiff'
The msttcorefonts packages can be obtained by following the instructions
present [here](http://www.fedorafaq.org/#installfonts). For the optional
packages:
* php-cgi is provided by the php-cli package
* sun-java6-fonts doesn't exist in Fedora repositories, needs investigating
### Arch Linux
Most of these packages are probably already installed since they're often used,
and the parameter --needed ensures that packages up to date are not reinstalled.
sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig \
nss alsa-lib gconf glib2 gtk2 nspr ttf-ms-fonts freetype2 cairo dbus \
libgnome-keyring
For the optional packages on Arch Linux:
* php-cgi is provided with pacman
* wdiff is not in the main repository but dwdiff is. You can get wdiff in
AUR/yaourt
* sun-java6-fonts do not seem to be in main repository or AUR.
### Mandriva
urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel \
lib64GConf2-devel lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel \
lib64pango1.0-devel lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python \
perl bison flex subversion gperf
* msttcorefonts are not available, you will need to build your own (see
instructions, not hard to do, see
[mandriva_msttcorefonts.md](mandriva_msttcorefonts.md)) or use drakfont to
import the fonts from a windows installation
* These packages are for 64 bit, to download the 32 bit packages,
substitute lib64 with lib
* Some of these packages might not be explicitly necessary as they come as
dependencies, there is no harm in including them however.
### Gentoo
emerge www-client/chromium
## Troubleshooting
### Linker Crashes
If, during the final link stage:
LINK out/Debug/chrome
You get an error like:
collect2: ld terminated with signal 6 Aborted terminate called after throwing an
instance of 'std::bad_alloc'
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
you are probably running out of memory when linking. You *must* use a 64-bit
system to build. Try the following build settings (see [GN build
configuration](https://www.chromium.org/developers/gn-build-configuration) for
setting):
* Build in release mode (debugging symbols require more memory).
`is_debug = false`
* Turn off symbols. `symbol_level = 0`
* Build in component mode (this is for developers only, it will be slower and
may have broken functionality). `is_component_build = true`
## More links
* [Faster builds on Linux](linux_faster_builds.md)
* Information about [building with Clang](clang.md).
* You may want to
[use a chroot](using_a_linux_chroot.md) to
isolate yourself from versioning or packaging conflicts (or to run the
layout tests).
* Cross-compiling for ARM? See [LinuxChromiumArm](linux_chromium_arm.md).
* Want to use Eclipse as your IDE? See
[LinuxEclipseDev](linux_eclipse_dev.md).
* Built version as Default Browser? See
[LinuxDevBuildAsDefaultBrowser](linux_dev_build_as_default_browser.md).
## Next Steps
If you want to contribute to the effort toward a Chromium-based browser for
Linux, please check out the [Linux Development page](linux_development.md) for
more information.

@ -0,0 +1,209 @@
# Mac Build Instructions
**Generally, this page is obsolete and you should look at
[the new page instead](mac_build_instructions.md).**
[TOC]
Google employee? See [go/building-chrome-mac](https://goto.google.com/building-chrome-mac) for extra tips.
## Prerequisites
* A Mac running 10.9+.
* [Xcode](https://developer.apple.com/xcode) 7.3+.
* [depot\_tools](http://dev.chromium.org/developers/how-tos/depottools).
* The OSX 10.10 SDK. Run
```
ls `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs
```
to check whether you have it. Building with the 10.11 SDK works too, but
the releases currently use the 10.10 SDK.
## Getting the code
[Check out the source code](https://www.chromium.org/developers/how-tos/get-the-code)
using Git.
Before checking out, go to the
[waterfall](http://build.chromium.org/buildbot/waterfall/) and check that the
source tree is open (to avoid pulling a broken tree).
The path to the build directory should not contain spaces (e.g. not
`~/Mac OS X/chromium`), as this will cause the build to fail. This includes your
drive name, the default "Macintosh HD2" for a second drive has a space.
## Building
Chromium on OS X is built using the [Ninja](ninja_build.md) tool and
the [Clang](clang.md) compiler. See both of those pages for further details on
how to tune the build.
Run
gn gen out/gn
to generate build files (replace "gn" in "out/gn" with whatever you like), and
then run
ninja -C out/gn chrome
to build. You can edit out/gn/args.gn to configure the build.
Before you build, you may want to
[install API keys](https://sites.google.com/a/chromium.org/dev/developers/how-tos/api-keys)
so that Chrome-integrated Google services work. This step is optional if you
aren't testing those features.
## Faster builds
Full rebuilds are about the same speed in Debug and Release, but linking is a
lot faster in Release builds.
Put
is_debug = false
in your args.gn to do a release build.
Put
is_component_build = true
in your args.gn to build many small dylibs instead of a single large executable.
This makes incremental builds much faster, at the cost of producing a binary
that opens less quickly. Component builds work in both debug and release.
Put
symbol_level = 1
in your args.gn to disable debug symbols altogether. This makes both full
rebuilds and linking faster (at the cost of not getting symbolized backtraces
in gdb).
You might also want to [install ccache](ccache_mac.md) to speed up the build.
## Running
All build output is located in the `out` directory (in the example above,
`~/chromium/src/out`). You can find the applications at
`gn/Content Shell.app` and `gn/Chromium.app`.
## Unit Tests
We have several unit test targets that build, and tests that run and pass. A
small subset of these is:
* `unit_tests` from `chrome/chrome.gyp`
* `base_unittests` from `base/base.gyp`
* `net_unittests` from `net/net.gyp`
* `url_unittests` from `url/url.gyp`
When these tests are built, you will find them in the `out/gn`
directory. You can run them from the command line:
~/chromium/src/out/gn/unit_tests
## Coding
According to the
[Chromium style guide](http://dev.chromium.org/developers/coding-style) code is
[not allowed to have whitespace on the ends of lines](https://google.github.io/styleguide/cppguide.html#Horizontal_Whitespace).
Run `git cl format` after committing to your local branch and before uploading
to clang-format your code.
## Debugging
Good debugging tips can be found
[here](http://dev.chromium.org/developers/how-tos/debugging-on-os-x). If you
would like to debug in a graphical environment, rather than using `lldb` at the
command line, that is possible without building in Xcode. See
[Debugging in Xcode](http://www.chromium.org/developers/how-tos/debugging-on-os-x/building-with-ninja-debugging-with-xcode)
for information on how.
## Contributing
Once youre comfortable with building Chromium, check out
[Contributing Code](http://dev.chromium.org/developers/contributing-code) for
information about writing code for Chromium and contributing it.
## Using Xcode-Ninja Hybrid
While using Xcode is unsupported, gn supports a hybrid approach of using ninja
for building, but Xcode for editing and driving compilation. Xcode is still
slow, but it runs fairly well even **with indexing enabled**. Most people
build in the Terminal and write code with a text editor though.
With hybrid builds, compilation is still handled by ninja, and can be run by the
command line (e.g. ninja -C out/gn chrome) or by choosing the chrome target
in the hybrid workspace and choosing build.
To use Xcode-Ninja Hybrid pass --ide=xcode to `gn gen`
```shell
gn gen out/gn --ide=xcode
```
Open it:
```shell
open out/gn/ninja/all.xcworkspace
```
You may run into a problem where http://YES is opened as a new tab every time
you launch Chrome. To fix this, open the scheme editor for the Run scheme,
choose the Options tab, and uncheck "Allow debugging when using document
Versions Browser". When this option is checked, Xcode adds
`--NSDocumentRevisionsDebugMode YES` to the launch arguments, and the `YES` gets
interpreted as a URL to open.
If you have problems building, join us in `#chromium` on `irc.freenode.net` and
ask there. As mentioned above, be sure that the
[waterfall](http://build.chromium.org/buildbot/waterfall/) is green and the tree
is open before checking out. This will increase your chances of success.
## Improving performance of `git status`
`git status` is used frequently to determine the status of your checkout. Due
to the number of files in Chromium's checkout, `git status` performance can be
quite variable. Increasing the system's vnode cache appears to help. By
default, this command:
sysctl -a | egrep kern\..*vnodes
Outputs `kern.maxvnodes: 263168` (263168 is 257 * 1024). To increase this
setting:
sudo sysctl kern.maxvnodes=$((512*1024))
Higher values may be appropriate if you routinely move between different
Chromium checkouts. This setting will reset on reboot, the startup setting can
be set in `/etc/sysctl.conf`:
echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf
Or edit the file directly.
If your `git --version` reports 2.6 or higher, the following may also improve
performance of `git status`:
git update-index --untracked-cache
## Xcode license agreement
If you're getting the error
```
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
```
the Xcode license hasn't been accepted yet which (contrary to the message) any
user can do by running:
xcodebuild -license
Only accepting for all users of the machine requires root:
sudo xcodebuild -license

@ -0,0 +1,111 @@
# Windows Build Instructions
**Generally, this page is obsolete and you should look at
[the new page instead](windows_build_instructions.md).**
## Common checkout instructions
This page covers Windows-specific setup and configuration. The
[general checkout
instructions](http://dev.chromium.org/developers/how-tos/get-the-code) cover
installing depot tools and checking out the code via git.
## Setting up Windows
You must set your Windows system locale to English, or else you may get
build errors about "The file contains a character that cannot be
represented in the current code page."
### Setting up the environment for Visual Studio
You must build with Visual Studio 2015 Update 3; no other version is
supported.
You must have Windows 7 x64 or later. x86 OSs are unsupported.
## Getting the compiler toolchain
Follow the appropriate path below:
### Open source contributors
As of March 11, 2016 Chromium requires Visual Studio 2015 to build.
Install Visual Studio 2015 Update 3 or later - Community Edition
should work if its license is appropriate for you. Use the Custom Install option
and select:
- Visual C++, which will select three sub-categories including MFC
- Universal Windows Apps Development Tools > Tools
- Universal Windows Apps Development Tools > Windows 10 SDK (10.0.10586)
You must have the 10586 SDK installed or else you will hit compile errors such
as redefined macros.
Install Windows Driver Kit (WDK) 10, or use some other method to get the
Debugging Tools for Windows.
Run `set DEPOT_TOOLS_WIN_TOOLCHAIN=0`, or set that variable in your
global environment.
Compilation is done through ninja, **not** Visual Studio.
### Google employees
Run: `download_from_google_storage --config` and follow the
authentication instructions. **Note that you must authenticate with your
@google.com credentials**, not @chromium.org. Enter "0" if asked for a
project-id.
Run: `gclient sync` again to download and install the toolchain automatically.
The toolchain will be in `depot_tools\win_toolchain\vs_files\<hash>`, and windbg
can be found in `depot_tools\win_toolchain\vs_files\<hash>\win_sdk\Debuggers`.
If you want the IDE for debugging and editing, you will need to install
it separately, but this is optional and not needed to build Chromium.
## Using the Visual Studio IDE
If you want to use the Visual Studio IDE, use the `--ide` command line
argument to `gn gen` when you generate your output directory (as described on
the [get the code](http://dev.chromium.org/developers/how-tos/get-the-code)
page):
```gn gen --ide=vs out\Default
devenv out\Default\all.sln
```
GN will produce a file `all.sln` in your build directory. It will internally
use Ninja to compile while still allowing most IDE functions to work (there is
no native Visual Studio compilation mode). If you manually run "gen" again you
will need to resupply this argument, but normally GN will keep the build and
IDE files up to date automatically when you build.
The generated solution will contain several thousand projects and will be very
slow to load. Use the `--filters` argument to restrict generating project files
for only the code you're interested in, although this will also limit what
files appear in the project explorer. A minimal solution that will let you
compile and run Chrome in the IDE but will not show any source files is:
```gn gen --ide=vs --filters=//chrome out\Default```
There are other options for controlling how the solution is generated, run `gn
help gen` for the current documentation.
## Performance tips
1. Have a lot of fast CPU cores and enough RAM to keep them all busy.
(Minimum recommended is 4-8 fast cores and 16-32 GB of RAM)
2. Reduce file system overhead by excluding build directories from
antivirus and indexing software.
3. Store the build tree on a fast disk (preferably SSD).
4. If you are primarily going to be doing debug development builds, you
should use the component build. Set the [build
arg](https://www.chromium.org/developers/gn-build-configuration)
`is_component_build = true`.
This will generate many DLLs and enable incremental linking, which makes
linking **much** faster in Debug.
Still, expect build times of 30 minutes to 2 hours when everything has to
be recompiled.

@ -1,30 +1,28 @@
# Windows Build Instructions
# Checking out and building Chromium on Windows
## Common checkout instructions
**See also [the old version of this page](old_linux_build_instructions.md).**
This page covers Windows-specific setup and configuration. The
[general checkout
instructions](http://dev.chromium.org/developers/how-tos/get-the-code) cover
installing depot tools and checking out the code via git.
Google employee? See [go/building-chrome](https://goto.google.com/building-chrome) instead.
[TOC]
## System requirements
* A 64-bit Intel machine with at least 8GB of RAM. More than 16GB is highly
recommended.
* At least 100GB of free disk space.
* Visual Studio 2015 Update 3, see below (no other version is supported).
* Windows 7 or newer.
## Setting up Windows
### System locale
You must set your Windows system locale to English, or else you may get
build errors about "The file contains a character that cannot be
represented in the current code page."
### Setting up the environment for Visual Studio
You must build with Visual Studio 2015 Update 3; no other version is
supported.
You must have Windows 7 x64 or later. x86 OSs are unsupported.
## Getting the compiler toolchain
Follow the appropriate path below:
### Open source contributors
### Visual Studio
As of March 11, 2016 Chromium requires Visual Studio 2015 to build.
@ -42,27 +40,101 @@ as redefined macros.
Install Windows Driver Kit (WDK) 10, or use some other method to get the
Debugging Tools for Windows.
Run `set DEPOT_TOOLS_WIN_TOOLCHAIN=0`, or set that variable in your
global environment.
## Install `depot_tools`
Compilation is done through ninja, **not** Visual Studio.
Download the (depot_tools bundle)[https://storage.googleapis.com/chrome-infra/depot_tools.zip]
and extract it somewhere.
### Google employees
*** note
**Warning:** **DO NOT** use drag-n-drop or copy-n-paste extract from Explorer,
this will not extract the hidden “.git” folder which is necessary for
depot_tools to autoupdate itself. You can use “Extract all…” from the
context menu though.
***
Run: `download_from_google_storage --config` and follow the
authentication instructions. **Note that you must authenticate with your
@google.com credentials**, not @chromium.org. Enter "0" if asked for a
project-id.
Add depot_tools to the start of your PATH (must be ahead of any installs of
Python). Assuming you unzipped the bundle to C:\src\depot_tools:
Run: `gclient sync` again to download and install the toolchain automatically.
With Administrator access:
The toolchain will be in `depot_tools\win_toolchain\vs_files\<hash>`, and windbg
can be found in `depot_tools\win_toolchain\vs_files\<hash>\win_sdk\Debuggers`.
Control Panel → System and Security → System → Advanced system settings
If you want the IDE for debugging and editing, you will need to install
it separately, but this is optional and not needed to build Chromium.
Modify the PATH system variable to include C:\src\depot_tools.
## Using the Visual Studio IDE
Without Administrator access:
Control Panel → User Accounts → User Accounts → Change my environment variables
Add a PATH user variable: C:\src\depot_tools;%PATH%.
Also, add a DEPOT_TOOLS_WIN_TOOLCHAIN system variable in the same way, and set
it to 0. This tells depot_tools to use your locally installed version of Visual
Studio (by default, depot_tools will try to use a google-internal version).
From a cmd.exe shell, run the command gclient (without arguments). On first
run, gclient will install all the Windows-specific bits needed to work with
the code, including msysgit and python.
* If you run gclient from a non-cmd shell (e.g., cygwin, PowerShell),
it may appear to run properly, but msysgit, python, and other tools
may not get installed correctly.
* If you see strange errors with the file system on the first run of gclient,
you may want to [disable Windows Indexing](http://tortoisesvn.tigris.org/faq.html#cantmove2).
After running gclient open a command prompt and type `where python` and
confirm that the depot_tools `python.bat` comes ahead of any copies of
python.exe. Failing to ensure this can lead to overbuilding when
using gn - see [crbug.com/611087](https://crbug.com/611087).
## Get the code
Create 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
Run the `fetch` tool from depot_tools to check out the code and its
dependencies.
$ fetch chromium
If you don't want the full repo history, you can save a lot of time by
adding the `--no-history` flag to fetch. Expect the command to take
30 minutes on even a fast connection, and many hours on slower ones.
When fetch completes, it will have created a directory called `src`.
The remaining instructions assume you are now in that directory:
$ cd src
### (optional) Install API keys
You can also [instaldl API keys](https://www.chromium.org/developers/how-tos/api-keys)
if you want to talk to some of the Google services, but this is not necessary
for most development and testing purposes.
## Seting up the Build
Chromium uses [Ninja](https://ninja-build.org) as its main build tool, and
a tool called [GN](../tools/gn/docs/quick_start.md) to generate
the .ninja files to do the build. To create a build directory:
$ gn gen out/Default
* You only have to do run this command once, it will self-update the build
files as needed after that.
* You can replace `out/Default` with another directory name, but we recommend
it should still be a subdirectory of `out`.
* To specify build parameters for GN builds, including release settings,
see [GN build configuration](https://www.chromium.org/developers/gn-build-configuration).
The default will be a debug component build matching the current host
operating system and CPU.
* For more info on GN, run `gn help` on the command line or read the
[quick start guide](../tools/gn/docs/quick_start.md).
### Using the Visual Studio IDE
If you want to use the Visual Studio IDE, use the `--ide` command line
argument to `gn gen` when you generate your output directory (as described on
@ -90,19 +162,53 @@ compile and run Chrome in the IDE but will not show any source files is:
There are other options for controlling how the solution is generated, run `gn
help gen` for the current documentation.
## Performance tips
### Faster builds
1. Have a lot of fast CPU cores and enough RAM to keep them all busy.
(Minimum recommended is 4-8 fast cores and 16-32 GB of RAM)
2. Reduce file system overhead by excluding build directories from
antivirus and indexing software.
3. Store the build tree on a fast disk (preferably SSD).
4. If you are primarily going to be doing debug development builds, you
should use the component build. Set the [build
arg](https://www.chromium.org/developers/gn-build-configuration)
`is_component_build = true`.
This will generate many DLLs and enable incremental linking, which makes
linking **much** faster in Debug.
* Reduce file system overhead by excluding build directories from
antivirus and indexing software.
* Store the build tree on a fast disk (preferably SSD).
Still, expect build times of 30 minutes to 2 hours when everything has to
be recompiled.
## Build Chromium
Build Chromium (the "chrome" target) with Ninja using the command:
$ ninja -C out\Default chrome
You can get a list of all of the other build targets from GN by running
`gn ls out/Default` from the command line. To compile one, pass to Ninja
the GN label with no preceding "//" (so for `//chrome/test:unit_tests`
use ninja -C out/Default chrome/test:unit_tests`).
## Run Chromium
Once it is built, you can simply run the browser:
$ out\Default\chrome.exe
## Running test targets
You can run the tests in the same way. You can also limit which tests are
run using the `--gtest_filter` arg, e.g.:
$ ninja -C out\Default unit_tests --gtest_filter="PushClientTest.*"
You can find out more about GoogleTest at its
[GitHub page](https://github.com/google/googletest).
## Update your checkout
To update an existing checkout, you can run
$ git rebase-update
$ gclient sync
The first command updates the primary Chromium source repository and rebases
any of your local branches on top of tip-of-tree (aka the Git branch `origin/master`).
If you don't want to use this script, you can also just use `git pull` or
other common Git commands to update the repo.
The second command syncs the subrepositories to the appropriate versions and
re-runs the hooks as needed.