blob: dda0accd2a54f396ef653395bd5dbb6e1b40300b [file] [log] [blame] [view]
dpranke1a70d0c2016-12-01 02:42:291# Checking out and Building Chromium for Windows
2
Bruce Dawson4d1de592017-09-08 00:24:003There are instructions for other platforms linked from the
dpranke1a70d0c2016-12-01 02:42:294[get the code](get_the_code.md) page.
tfarina502f3882016-03-23 12:48:105
dpranke1a70d0c2016-12-01 02:42:296## Instructions for Google Employees
7
8Are you a Google employee? See
scottmg292538ae2017-01-12 00:10:559[go/building-chrome-win](https://goto.google.com/building-chrome-win) instead.
dpranke0ae7cad2016-11-30 07:47:5810
11[TOC]
12
13## System requirements
14
15* A 64-bit Intel machine with at least 8GB of RAM. More than 16GB is highly
16 recommended.
dpranke4b470c5b2017-01-19 17:38:0417* At least 100GB of free disk space on an NTFS-formatted hard drive. FAT32
18 will not work, as some of the Git packfiles are larger than 4GB.
Bruce Dawson97367b72017-10-18 00:47:4919* An appropriate version of Visual Studio, as described below.
dpranke0ae7cad2016-11-30 07:47:5820* Windows 7 or newer.
brettwc25693b32016-05-26 01:11:5221
tfarina502f3882016-03-23 12:48:1022## Setting up Windows
23
dpranke0ae7cad2016-11-30 07:47:5824### Visual Studio
tfarina502f3882016-03-23 12:48:1025
Raul Tambre1bb5c1a2018-12-29 00:57:1226Chromium requires Visual Studio 2017 (>=15.7.2) or 2019 (>=16.0.0) to build.
Bruce Dawsonfa551102019-06-11 23:50:0427Visual Studio can also be used to debug Chromium and Visual Studio 2019 is
28preferred for this as it handles Chromium's large debug information much better.
Raul Tambre1bb5c1a2018-12-29 00:57:1229The clang-cl compiler is used but Visual Studio's header files, libraries, and
30some tools are required. Visual Studio Community Edition should work if its
31license is appropriate for you. You must install the "Desktop development with
32C++" component and the "MFC/ATL support" sub-components. This can be done from
33the command line by passing these arguments to the Visual Studio installer (see
34below for ARM64 instructions):
Bruce Dawson1c0979a62017-09-13 17:47:2135```shell
Bruce Dawsone42d7642018-12-10 23:50:0036$ PATH_TO_INSTALLER.EXE ^
37--add Microsoft.VisualStudio.Workload.NativeDesktop ^
38--add Microsoft.VisualStudio.Component.VC.ATLMFC ^
39--includeRecommended
Bruce Dawson1c0979a62017-09-13 17:47:2140```
pwnall43b43ba2016-08-22 19:29:2941
Bruce Dawsone42d7642018-12-10 23:50:0042If you want to build for ARM64 Win32 then some extra arguments are needed. The
43full set for that case is:
44```shell
45$ PATH_TO_INSTALLER.EXE ^
46--add Microsoft.VisualStudio.Workload.NativeDesktop ^
47--add Microsoft.VisualStudio.Component.VC.ATLMFC ^
48--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^
49--add Microsoft.VisualStudio.Component.VC.MFC.ARM64 ^
50--includeRecommended
51```
52
Nico Weberd9919882019-07-08 11:12:4153You must have the version 10.0.18362 or higher Windows 10 SDK installed. This
Bruce Dawsone42d7642018-12-10 23:50:0054can be installed separately or by checking the appropriate box in the Visual
55Studio Installer.
Bruce Dawsone9f20fff2018-03-03 01:58:3856
57The SDK Debugging Tools must also be installed. If the Windows 10 SDK was
58installed via the Visual Studio installer, then they can be installed by going
59to: Control Panel → Programs → Programs and Features → Select the "Windows
60Software Development Kit" → Change → Change → Check "Debugging Tools For
61Windows" → Change. Or, you can download the standalone SDK installer and use it
62to install the Debugging Tools.
Robert Sesekc8ffa1b2017-08-04 19:55:2263
dpranke0ae7cad2016-11-30 07:47:5864## Install `depot_tools`
tfarina502f3882016-03-23 12:48:1065
dpranke1a70d0c2016-12-01 02:42:2966Download the [depot_tools bundle](https://storage.googleapis.com/chrome-infra/depot_tools.zip)
dpranke0ae7cad2016-11-30 07:47:5867and extract it somewhere.
tfarina502f3882016-03-23 12:48:1068
dpranke0ae7cad2016-11-30 07:47:5869*** note
70**Warning:** **DO NOT** use drag-n-drop or copy-n-paste extract from Explorer,
71this will not extract the hidden “.git” folder which is necessary for
Bruce Dawson4d1de592017-09-08 00:24:0072depot_tools to autoupdate itself. You can use “Extract all…” from the
dpranke0ae7cad2016-11-30 07:47:5873context menu though.
74***
tfarina502f3882016-03-23 12:48:1075
Bruce Dawson4d1de592017-09-08 00:24:0076Add depot_tools to the start of your PATH (must be ahead of any installs of
dpranke4b470c5b2017-01-19 17:38:0477Python). Assuming you unzipped the bundle to C:\src\depot_tools, open:
tfarina502f3882016-03-23 12:48:1078
dpranke0ae7cad2016-11-30 07:47:5879Control Panel → System and Security → System → Advanced system settings
tfarina502f3882016-03-23 12:48:1080
dpranke4b470c5b2017-01-19 17:38:0481If you have Administrator access, Modify the PATH system variable and
82put `C:\src\depot_tools` at the front (or at least in front of any directory
83that might already have a copy of Python or Git).
tfarina502f3882016-03-23 12:48:1084
dpranke4b470c5b2017-01-19 17:38:0485If you don't have Administrator access, you can add a user-level PATH
86environment variable and put `C:\src\depot_tools` at the front, but
87if your system PATH has a Python in it, you will be out of luck.
dpranke0ae7cad2016-11-30 07:47:5888
89Also, add a DEPOT_TOOLS_WIN_TOOLCHAIN system variable in the same way, and set
90it to 0. This tells depot_tools to use your locally installed version of Visual
Bruce Dawsonfa551102019-06-11 23:50:0491Studio (by default, depot_tools will try to use a google-internal version). If
92you want to build with Visual Studio 2019 instead of Visual Studio 2017 (the
93default) then set the GYP_MSVS_VERSION environment variable to 2019.
dpranke0ae7cad2016-11-30 07:47:5894
95From a cmd.exe shell, run the command gclient (without arguments). On first
96run, gclient will install all the Windows-specific bits needed to work with
97the code, including msysgit and python.
98
99* If you run gclient from a non-cmd shell (e.g., cygwin, PowerShell),
100 it may appear to run properly, but msysgit, python, and other tools
101 may not get installed correctly.
102* If you see strange errors with the file system on the first run of gclient,
103 you may want to [disable Windows Indexing](http://tortoisesvn.tigris.org/faq.html#cantmove2).
104
Bruce Dawson4d1de592017-09-08 00:24:00105After running gclient open a command prompt and type `where python` and
106confirm that the depot_tools `python.bat` comes ahead of any copies of
107python.exe. Failing to ensure this can lead to overbuilding when
dpranke0ae7cad2016-11-30 07:47:58108using gn - see [crbug.com/611087](https://crbug.com/611087).
109
110## Get the code
111
Leonard Mosescu718c9ac2017-06-20 18:06:32112First, configure Git:
113
114```shell
115$ git config --global user.name "My Name"
116$ git config --global user.email "[email protected]"
117$ git config --global core.autocrlf false
118$ git config --global core.filemode false
119$ git config --global branch.autosetuprebase always
120```
121
sdy93387fa2016-12-01 01:03:44122Create a `chromium` directory for the checkout and change to it (you can call
dpranke0ae7cad2016-11-30 07:47:58123this whatever you like and put it wherever you like, as
124long as the full path has no spaces):
dpranke0ae7cad2016-11-30 07:47:58125
sdy93387fa2016-12-01 01:03:44126```shell
127$ mkdir chromium && cd chromium
128```
129
130Run the `fetch` tool from `depot_tools` to check out the code and its
dpranke0ae7cad2016-11-30 07:47:58131dependencies.
132
sdy93387fa2016-12-01 01:03:44133```shell
xiaoyin.l802e4b3e2016-12-04 22:17:30134$ fetch chromium
sdy93387fa2016-12-01 01:03:44135```
dpranke0ae7cad2016-11-30 07:47:58136
137If you don't want the full repo history, you can save a lot of time by
sdy93387fa2016-12-01 01:03:44138adding the `--no-history` flag to `fetch`.
dpranke0ae7cad2016-11-30 07:47:58139
sdy93387fa2016-12-01 01:03:44140Expect the command to take 30 minutes on even a fast connection, and many
141hours on slower ones.
dpranke0ae7cad2016-11-30 07:47:58142
sdy93387fa2016-12-01 01:03:44143When `fetch` completes, it will have created a hidden `.gclient` file and a
144directory called `src` in the working directory. The remaining instructions
145assume you have switched to the `src` directory:
dpranke0ae7cad2016-11-30 07:47:58146
sdy93387fa2016-12-01 01:03:44147```shell
148$ cd src
149```
dpranke0ae7cad2016-11-30 07:47:58150
sdy93387fa2016-12-01 01:03:44151*Optional*: You can also [install API
152keys](https://www.chromium.org/developers/how-tos/api-keys) if you want your
153build to talk to some Google services, but this is not necessary for most
154development and testing purposes.
dpranke0ae7cad2016-11-30 07:47:58155
dpranke1a70d0c2016-12-01 02:42:29156## Setting up the build
dpranke0ae7cad2016-11-30 07:47:58157
Tom Bridgwatereef401542018-08-17 00:54:43158Chromium uses [Ninja](https://ninja-build.org) as its main build tool along with
159a tool called [GN](https://gn.googlesource.com/gn/+/master/docs/quick_start.md)
160to generate `.ninja` files. You can create any number of *build directories*
161with different configurations. To create a build directory:
dpranke0ae7cad2016-11-30 07:47:58162
sdy93387fa2016-12-01 01:03:44163```shell
164$ gn gen out/Default
165```
dpranke0ae7cad2016-11-30 07:47:58166
sdy93387fa2016-12-01 01:03:44167* You only have to run this once for each new build directory, Ninja will
168 update the build files as needed.
169* You can replace `Default` with another name, but
170 it should be a subdirectory of `out`.
171* For other build arguments, including release settings, see [GN build
172 configuration](https://www.chromium.org/developers/gn-build-configuration).
dpranke0ae7cad2016-11-30 07:47:58173 The default will be a debug component build matching the current host
174 operating system and CPU.
Tom Bridgwatereef401542018-08-17 00:54:43175* For more info on GN, run `gn help` on the command line or read the [quick
176 start guide](https://gn.googlesource.com/gn/+/master/docs/quick_start.md).
dpranke0ae7cad2016-11-30 07:47:58177
178### Using the Visual Studio IDE
tfarina502f3882016-03-23 12:48:10179
brettwc25693b32016-05-26 01:11:52180If you want to use the Visual Studio IDE, use the `--ide` command line
181argument to `gn gen` when you generate your output directory (as described on
xiaoyin.l1003c0b2016-12-06 02:51:17182the [get the code](https://dev.chromium.org/developers/how-tos/get-the-code)
brettwc25693b32016-05-26 01:11:52183page):
tfarina502f3882016-03-23 12:48:10184
dpranke1a70d0c2016-12-01 02:42:29185```shell
186$ gn gen --ide=vs out\Default
187$ devenv out\Default\all.sln
tfarina502f3882016-03-23 12:48:10188```
189
brettwc25693b32016-05-26 01:11:52190GN will produce a file `all.sln` in your build directory. It will internally
191use Ninja to compile while still allowing most IDE functions to work (there is
192no native Visual Studio compilation mode). If you manually run "gen" again you
193will need to resupply this argument, but normally GN will keep the build and
thakis3e861de2016-06-14 14:24:01194IDE files up to date automatically when you build.
tfarina502f3882016-03-23 12:48:10195
brettwc25693b32016-05-26 01:11:52196The generated solution will contain several thousand projects and will be very
197slow to load. Use the `--filters` argument to restrict generating project files
James Darpiniandde42b52018-04-05 23:06:56198for only the code you're interested in. Although this will also limit what
199files appear in the project explorer, debugging will still work and you can
200set breakpoints in files that you open manually. A minimal solution that will
201let you compile and run Chrome in the IDE but will not show any source files
202is:
brettwc25693b32016-05-26 01:11:52203
dpranke1a70d0c2016-12-01 02:42:29204```
James Darpiniandde42b52018-04-05 23:06:56205$ gn gen --ide=vs --filters=//chrome --no-deps out\Default
dpranke1a70d0c2016-12-01 02:42:29206```
brettwc25693b32016-05-26 01:11:52207
James Darpiniandde42b52018-04-05 23:06:56208You can selectively add other directories you care about to the filter like so:
209`--filters=//chrome;//third_party/WebKit/*;//gpu/*`.
210
brettwc25693b32016-05-26 01:11:52211There are other options for controlling how the solution is generated, run `gn
212help gen` for the current documentation.
213
James Darpiniandde42b52018-04-05 23:06:56214By default when you start debugging in Visual Studio the debugger will only
215attach to the main browser process. To debug all of Chrome, install
216[Microsoft's Child Process Debugging Power Tool](https://blogs.msdn.microsoft.com/devops/2014/11/24/introducing-the-child-process-debugging-power-tool/).
217You will also need to run Visual Studio as administrator, or it will silently
218fail to attach to some of Chrome's child processes.
219
220It is also possible to debug and develop Chrome in Visual Studio without a
221solution file. Simply "open" your chrome.exe binary with
222`File->Open->Project/Solution`, or from a Visual Studio command prompt like
223so: `devenv /debugexe out\Debug\chrome.exe <your arguments>`. Many of Visual
224Studio's code editing features will not work in this configuration, but by
225installing the [VsChromium Visual Studio Extension](https://chromium.github.io/vs-chromium/)
226you can get the source code to appear in the solution explorer window along
227with other useful features such as code search.
228
dpranke0ae7cad2016-11-30 07:47:58229### Faster builds
tfarina502f3882016-03-23 12:48:10230
dpranke0ae7cad2016-11-30 07:47:58231* Reduce file system overhead by excluding build directories from
232 antivirus and indexing software.
233* Store the build tree on a fast disk (preferably SSD).
brucedawsoncfc7fd52017-07-06 18:41:01234* The more cores the better (20+ is not excessive) and lots of RAM is needed
235(64 GB is not excessive).
tfarina502f3882016-03-23 12:48:10236
brucedawsoncfc7fd52017-07-06 18:41:01237There are some gn flags that can improve build speeds. You can specify these
238in the editor that appears when you create your output directory
239(`gn args out/Default`) or on the gn gen command line
240(`gn gen out/Default --args="is_component_build = true is_debug = true"`).
241Some helpful settings to consider using include:
242* `is_component_build = true` - this uses more, smaller DLLs, and incremental
243linking.
Bruce Dawsonfcd3deb12017-07-28 17:12:20244* `enable_nacl = false` - this disables Native Client which is usually not
245needed for local builds.
brucedawsoncfc7fd52017-07-06 18:41:01246* `target_cpu = "x86"` - x86 builds are slightly faster than x64 builds and
247support incremental linking for more targets. Note that if you set this but
Bruce Dawsonfcd3deb12017-07-28 17:12:20248don't' set enable_nacl = false then build times may get worse.
James Cook26699a92019-03-12 22:23:10249* `blink_symbol_level = 0` - turn off source-level debugging for
brucedawsoncfc7fd52017-07-06 18:41:01250blink to reduce build times, appropriate if you don't plan to debug blink.
brucedawsoncfc7fd52017-07-06 18:41:01251
Bruce Dawson7ff1fe932018-06-14 19:57:12252In order to speed up linking you can set `symbol_level = 1` - this option
253reduces the work the linker has to do but when this option is set you cannot do
254source-level debugging. Switching from `symbol_level = 2` (the default) to
255`symbol_level = 1` requires recompiling everything.
brucedawsoncfc7fd52017-07-06 18:41:01256
Bruce Dawsone9f20fff2018-03-03 01:58:38257In addition, Google employees should use goma, a distributed compilation system.
258Detailed information is available internally but the relevant gn arg is:
259* `use_goma = true`
brucedawsoncfc7fd52017-07-06 18:41:01260
261To get any benefit from goma it is important to pass a large -j value to ninja.
Bruce Dawsone9f20fff2018-03-03 01:58:38262A good default is 10\*numCores to 20\*numCores. If you run autoninja then it
263will automatically pass an appropriate -j value to ninja for goma or not.
264
265```shell
266$ autoninja -C out\Default chrome
267```
brucedawsoncfc7fd52017-07-06 18:41:01268
269When invoking ninja specify 'chrome' as the target to avoid building all test
270binaries as well.
271
272Still, builds will take many hours on many machines.
dpranke0ae7cad2016-11-30 07:47:58273
Bruce Dawsone9f20fff2018-03-03 01:58:38274### Why is my build slow?
275
276Many things can make builds slow, with Windows Defender slowing process startups
277being a frequent culprit. Have you ensured that the entire Chromium src
Bruce Dawson0bbe2d42018-03-06 19:45:55278directory is excluded from antivirus scanning (on Google machines this means
Bruce Dawsone9f20fff2018-03-03 01:58:38279putting it in a ``src`` directory in the root of a drive)? Have you tried the
280different settings listed above, including different link settings and -j
281values? Have you asked on the chromium-dev mailing list to see if your build is
282slower than expected for your machine's specifications?
283
Bruce Dawson89390172019-05-08 09:51:18284The next step is to gather some data. If you set the ``NINJA_SUMMARIZE_BUILD``
Bruce Dawsonb9988e92019-09-16 17:01:10285environment variable to 1 then ``autoninja`` will do three things. First, it
286will set the [NINJA_STATUS](https://ninja-build.org/manual.html#_environment_variables)
Bruce Dawson89390172019-05-08 09:51:18287environment variable so that ninja will print additional information while
288building Chrome. It will show how many build processes are running at any given
289time, how many build steps have completed, how many build steps have completed
290per second, and how long the build has been running, as shown here:
Bruce Dawsone9f20fff2018-03-03 01:58:38291
292```shell
Bruce Dawson89390172019-05-08 09:51:18293$ set NINJA_SUMMARIZE_BUILD=1
Bruce Dawsone9f20fff2018-03-03 01:58:38294$ autoninja -C out\Default base
295ninja: Entering directory `out\Default'
296[1 processes, 86/86 @ 2.7/s : 31.785s ] LINK(DLL) base.dll base.dll.lib base.dll.pdb
297```
298
Bruce Dawson89390172019-05-08 09:51:18299This makes slow process creation immediately obvious and lets you tell quickly
300if a build is running more slowly than normal.
301
302In addition, setting ``NINJA_SUMMARIZE_BUILD=1`` tells ``autoninja`` to print a
303build performance summary when the build completes, showing the slowest build
304steps and slowest build-step types, as shown here:
Bruce Dawsone9f20fff2018-03-03 01:58:38305
306```shell
307$ set NINJA_SUMMARIZE_BUILD=1
308$ autoninja -C out\Default base
Bruce Dawson2721f0b2019-11-08 18:41:27309Longest build steps:
310 0.1 weighted s to build obj/base/base/trace_log.obj (6.7 s elapsed time)
311 0.2 weighted s to build nasm.exe, nasm.exe.pdb (0.2 s elapsed time)
312 0.3 weighted s to build obj/base/base/win_util.obj (12.4 s elapsed time)
313 1.2 weighted s to build base.dll, base.dll.lib (1.2 s elapsed time)
314Time by build-step type:
315 0.0 s weighted time to generate 6 .lib files (0.3 s elapsed time sum)
316 0.1 s weighted time to generate 25 .stamp files (1.2 s elapsed time sum)
317 0.2 s weighted time to generate 20 .o files (2.8 s elapsed time sum)
318 1.7 s weighted time to generate 4 PEFile (linking) files (2.0 s elapsed
319time sum)
320 23.9 s weighted time to generate 770 .obj files (974.8 s elapsed time sum)
32126.1 s weighted time (982.9 s elapsed time sum, 37.7x parallelism)
322839 build steps completed, average of 32.17/s
Bruce Dawsone9f20fff2018-03-03 01:58:38323```
324
Bruce Dawson2721f0b2019-11-08 18:41:27325The "weighted" time is the elapsed time of each build step divided by the number
326of tasks that were running in parallel. This makes it an excellent approximation
327of how "important" a slow step was. A link that is entirely or mostly serialized
328will have a weighted time that is the same or similar to its elapsed time. A
329compile that runs in parallel with 999 other compiles will have a weighted time
330that is tiny.
331
Bruce Dawson0bbe2d42018-03-06 19:45:55332You can also generate these reports by manually running the script after a build:
333
334```shell
335$ python depot_tools\post_build_ninja_summary.py -C out\Default
336```
337
Bruce Dawsonb9988e92019-09-16 17:01:10338Finally, setting ``NINJA_SUMMARIZE_BUILD=1`` tells autoninja to tell Ninja to
339report on its own overhead by passing "-d stats". This can be helpful if, for
340instance, process creation (which shows up in the StartEdge metric) is making
341builds slow, perhaps due to antivirus interference due to clang-cl not being in
342an excluded directory:
Bruce Dawsone9f20fff2018-03-03 01:58:38343
344```shell
Bruce Dawsonb9988e92019-09-16 17:01:10345$ set NINJA_SUMMARIZE_BUILD=1
346$ autoninja -C out\Default base
347"c:\src\depot_tools\ninja.exe" -C out\Default base -j 10 -d stats
Bruce Dawsone9f20fff2018-03-03 01:58:38348metric count avg (us) total (ms)
349.ninja parse 3555 1539.4 5472.6
350canonicalize str 1383032 0.0 12.7
351canonicalize path 1402349 0.0 11.2
352lookup node 1398245 0.0 8.1
353.ninja_log load 2 118.0 0.2
354.ninja_deps load 2 67.5 0.1
355node stat 2516 29.6 74.4
356depfile load 2 1132.0 2.3
357StartEdge 88 3508.1 308.7
358FinishCommand 87 1670.9 145.4
359CLParser::Parse 45 1889.1 85.0
360```
361
Bruce Dawsonb9988e92019-09-16 17:01:10362You can also get a visual report of the build performance with
363[ninjatracing](https://github.com/nico/ninjatracing). This converts the
364.ninja_log file into a .json file which can be loaded into chrome://tracing:
365
366```shell
367$ python ninjatracing out\Default\.ninja_log >build.json
368```
369
dpranke0ae7cad2016-11-30 07:47:58370## Build Chromium
371
Max Morozf5b31fcd2018-08-10 21:55:48372Build Chromium (the "chrome" target) with Ninja using the command:
dpranke0ae7cad2016-11-30 07:47:58373
dpranke1a70d0c2016-12-01 02:42:29374```shell
Max Morozf5b31fcd2018-08-10 21:55:48375$ autoninja -C out\Default chrome
dpranke1a70d0c2016-12-01 02:42:29376```
dpranke0ae7cad2016-11-30 07:47:58377
Max Morozf5b31fcd2018-08-10 21:55:48378`autoninja` is a wrapper that automatically provides optimal values for the
379arguments passed to `ninja`.
380
dpranke0ae7cad2016-11-30 07:47:58381You can get a list of all of the other build targets from GN by running
382`gn ls out/Default` from the command line. To compile one, pass to Ninja
383the GN label with no preceding "//" (so for `//chrome/test:unit_tests`
384use ninja -C out/Default chrome/test:unit_tests`).
385
386## Run Chromium
387
388Once it is built, you can simply run the browser:
389
dpranke1a70d0c2016-12-01 02:42:29390```shell
391$ out\Default\chrome.exe
392```
393
394(The ".exe" suffix in the command is actually optional).
dpranke0ae7cad2016-11-30 07:47:58395
396## Running test targets
397
398You can run the tests in the same way. You can also limit which tests are
399run using the `--gtest_filter` arg, e.g.:
400
dpranke1a70d0c2016-12-01 02:42:29401```shell
402$ out\Default\unit_tests.exe --gtest_filter="PushClientTest.*"
403```
dpranke0ae7cad2016-11-30 07:47:58404
405You can find out more about GoogleTest at its
406[GitHub page](https://github.com/google/googletest).
407
408## Update your checkout
409
410To update an existing checkout, you can run
411
dpranke1a70d0c2016-12-01 02:42:29412```shell
413$ git rebase-update
414$ gclient sync
415```
dpranke0ae7cad2016-11-30 07:47:58416
417The first command updates the primary Chromium source repository and rebases
418any of your local branches on top of tip-of-tree (aka the Git branch `origin/master`).
Bruce Dawson4d1de592017-09-08 00:24:00419If you don't want to use this script, you can also just use `git pull` or
dpranke0ae7cad2016-11-30 07:47:58420other common Git commands to update the repo.
421
422The second command syncs the subrepositories to the appropriate versions and
423re-runs the hooks as needed.