Doc update for GN build

Explain the GN build setup for Windows, Mac, Linux, and Fuchsia, and
keep a separate section for the Android gyp build.

Bug: crashpad:235
Change-Id: Ifaabba430ab0f04bac5a4669523308040e55f05b
Reviewed-on: https://chromium-review.googlesource.com/1099255
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Scott Graham 2018-06-13 10:15:19 -07:00 committed by Commit Bot
parent fa47143c8c
commit 85565c545c

View File

@ -86,28 +86,25 @@ $ gclient sync
## Building ## Building
Crashpad uses [GYP](https://gyp.gsrc.io/) to generate ### Windows, Mac, Linux, Fuchsia
[Ninja](https://ninja-build.org/) build files. The build is described by `.gyp`
files throughout the Crashpad source code tree. The
[`build/gyp_crashpad.py`](https://chromium.googlesource.com/crashpad/crashpad/+/master/build/gyp_crashpad.py)
script runs GYP properly for Crashpad, and is also called when you run `fetch
crashpad`, `gclient sync`, or `gclient runhooks`.
The Ninja build files and build output are in the `out` directory. Both debug- On Windows, Mac, Linux, and Fuchsia Crashpad uses
and release-mode configurations are available. The examples below show the debug [GN](https://gn.googlesource.com/gn) to generate
configuration. To build and test the release configuration, substitute `Release` [Ninja](https://ninja-build.org/) build files. For example,
for `Debug`. On Windows, four configurations are available: `Debug` and
`Release` produce 32-bit x86 executables, and `Debug_x64` and `Release_x64`
produce x86_64 executables.
``` ```
$ cd ~/crashpad/crashpad $ cd ~/crashpad/crashpad
$ ninja -C out/Debug $ gn gen out/Default
$ ninja -C out/Default
``` ```
Ninja is part of the You can then use `gn args out/Default` or edit `out/Default/args.gn` to
configure the build, for example things like `is_debug=true` or
`target_cpu="x86"`.
GN and Ninja are part of the
[depot_tools](https://www.chromium.org/developers/how-tos/depottools). Theres [depot_tools](https://www.chromium.org/developers/how-tos/depottools). Theres
no need to install it separately. no need to install them separately.
### Android ### Android