Update quick start guide to reference tutorial files Quick start guide references tutorial files that were destroyed in gn migration: https://chromium-review.googlesource.com/c/chromium/src/+/1129822 The files were resurrected in chromium repo and this change updates the quick start guide to reference the tutorial files in the chromium repo. See https://bugs.chromium.org/p/chromium/issues/detail?id=923492#c1 Bug: 41 Change-Id: I9702694320d196d4c4369dd94c569fa609a55473 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/3780 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Scott Graham <scottmg@chromium.org>
diff --git a/docs/quick_start.md b/docs/quick_start.md index 4e1bdaf..d3941c5 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md
@@ -2,6 +2,10 @@ [TOC] +Note: the gn repo has been ported from chromium, and the tutorial within this +document has not yet been updated to reflect this. Building the tutorial files +will require the chromium tree, even though gn is now independent of chromium. + ## Running GN You just run `gn` from the command line. There is a script in @@ -94,7 +98,8 @@ ### Adding a build file -Create a `tools/gn/tutorial/BUILD.gn` file and enter the following: +Create a `tools/gn/tutorial/BUILD.gn` file [in the chromium repo](https://cs.chromium.org/chromium/src/tools/gn/tutorial/) and enter +the following: ``` executable("hello_world") { @@ -134,9 +139,11 @@ out/Default/hello_world ``` -GN encourages target names for static libraries that aren't globally -unique. To build one of these, you can pass the label with no leading -"//" to ninja: +You should see "Hello, world." output to the console. + +Side note: GN encourages target names for static libraries that aren't globally +unique. To build one of these, you can pass the label with its path (but no leading +"//") to ninja: ``` ninja -C out/Default tools/gn/tutorial:hello_world