GN: quick doc
authormtklein <mtklein@chromium.org>
Fri, 29 Jul 2016 15:35:54 +0000 (08:35 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 29 Jul 2016 15:35:54 +0000 (08:35 -0700)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2192203002
NOTRY=true
DOCS_PREVIEW= https://skia.org/user/quick/gn?cl=2192203002

Review-Url: https://codereview.chromium.org/2192203002

site/user/quick/gn.md [new file with mode: 0644]

diff --git a/site/user/quick/gn.md b/site/user/quick/gn.md
new file mode 100644 (file)
index 0000000..93f7680
--- /dev/null
@@ -0,0 +1,42 @@
+GN
+=====
+
+[GN](https://chromium.googlesource.com/chromium/src/tools/gn/)
+is a new meta-build system originally designed to replace GYP in Chromium.
+
+You can build Skia using GN in a limited number of configurations.  We expect
+that as that limited number rises, GN will become the preferred, and then only,
+way to build Skia.
+
+Supported Features
+----------
+
+    * Linux, Mac
+    * Software rendering
+    * libskia.a, libskia.so
+    * DM, nanobench
+
+Quickstart
+----------
+
+Please check out Skia using the instructions in one of the other quick start
+guides.  We diverge where they'd first run some command with "gyp" in it.
+
+<!--?prettify lang=sh?-->
+
+    # After gclient sync, run fetch-gn to make sure you have GN.
+    gclient sync && bin/fetch-gn
+
+    # Run GN to generate your build files.  Some examples.
+    gn gen out/Release
+    gn gen out/Debug --args=is_debug=true
+    gn gen out/Clang --args='cc="clang" cxx="clang++"'
+    gn gen out/Shared --args=is_component_build=true
+
+    # Build
+    ninja -C out/Release
+    ninja -C out/Debug
+    ninja -C out/Clang
+    ninja -C out/Shared
+
+From here everything is pretty much business as usual.