summaryrefslogtreecommitdiff
path: root/chromium/tools/gn/docs/hacking.md
blob: ab94b58c92724e894a63820b6a9b79312e752c83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Hacking on the GN binary itself

## Building GN itself

GN is part of the Chromium tree. If you have a Chromium checkout, you
already have the source and you can do `ninja -C out/Debug gn` to
build it.

To build gn using gn, run (in the root `src` directory):

```
gn gen out/Default
ninja -C out/Default gn
```

Change `out/Default` as necessary to put the build directory where you
want.

## Running GN's unit tests

```
ninja -C out/Default gn_unittests && out/Default/gn_unittests
```