gn bootstrap: Allow specifying ninja binary with $NINJA

This allows the builder to specify the path of the ninja binary in
case they want to use a specific version, or an alternate
implementation like samurai[0].

Also, when calling ninja, make sure build target comes after any
options.

[0] https://github.com/michaelforney/samurai

Change-Id: I4295baa9e0e04e61ae092a9b86ea6ddc943b3c92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1975453
Reviewed-by: Nico Weber <thakis@chromium.org>
Auto-Submit: Michael Forney <mforney@mforney.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#726552}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 53b414cba10bc3c38fca88c330d2146722b4e54c
1 file changed
tree: dadb3414efed53af7e5848b7db30a5450bb5e21d
  1. bootstrap/
  2. tutorial/
  3. README.md
  4. roll_gn.py
README.md

GN now lives at https://gn.googlesource.com/.

To roll the latest version of GN into Chromium:

  1. Create a new Git branch.
  2. Run python //tools/gn/roll_gn.py; this will modify //DEPS and //buildtools/DEPS to point to the most recent revision of GN and create a commit with a list of the changes included in the roll.
  3. Run git-cl upload to upload the commit as a change for review.

If you don't want to roll to the latest version, you can specify the SHA-1 to roll to use as an argument to the script, and it will be used instead.