aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/user
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-09-16 07:17:45 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-16 07:17:45 -0700
commit40efbe85525a4dceefb1ce46c036c01813492602 (patch)
treeb20002d855e426f60675ab5b3e64c87a0419ef6e /site/user
parentf29180e65afdd3bd5ff3c1a2f8d456f9aea125ed (diff)
Update GN docs to mention is_official_build and ndk_api.
is_official_build is the closest approximation to what we'd recommend people ship, and we'll keep tweaking it further toward that goal. I want it to be the first choices people see reading the doc to nudge them to defaulting into that if they don't know better. The familiar old Debug and Release for developers come later. It'd be a fine choice, for instance, for fiddle to build against. I dropped Stripped because that's something is_official_build now does more naturally. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342333002 NOTRY=true DOCS_PREVIEW= https://skia.org/?cl=2342333002 Review-Url: https://codereview.chromium.org/2342333002
Diffstat (limited to 'site/user')
-rw-r--r--site/user/quick/gn.md16
1 files changed, 11 insertions, 5 deletions
diff --git a/site/user/quick/gn.md b/site/user/quick/gn.md
index a0f5b0d2ff..22756a6f96 100644
--- a/site/user/quick/gn.md
+++ b/site/user/quick/gn.md
@@ -27,22 +27,27 @@ guides. We diverge where they'd first run some command with "gyp" in it.
# 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.
+ # Run GN to generate your build files.
+ gn gen out/Static --args='is_official_build=true'
+ gn gen out/Shared --args='is_official_build=true is_component_build=true'
+
+ # GN allows fine-grained settings for developers and special situations.
gn gen out/Debug
gn gen out/Release --args='is_debug=false'
gn gen out/Clang --args='cc="clang" cxx="clang++"'
- gn gen out/Shared --args='is_component_build=true'
gn gen out/Cached --args='compiler_prefix="ccache"'
- gn gen out/Stripped --args='extra_cflags="-g0"'
gn gen out/RTTI --args='extra_cflags_cc="-frtti"'
+ # To see all the current GN arguments, run
+ gn args out/Debug --list
+
# Build
+ ninja -C out/Static
+ ninja -C out/Shared
ninja -C out/Debug
ninja -C out/Release
ninja -C out/Clang
- ninja -C out/Shared
ninja -C out/Cached
- ninja -C out/Stripped
ninja -C out/RTTI
From here everything is pretty much business as usual.
@@ -74,6 +79,7 @@ desired `target_cpu`:
gn gen out/x86 --args='ndk="/tmp/ndk" target_cpu="x86"'
Other arguments like `is_debug` and `is_component_build` continue to work.
+Tweaking `ndk_api` gives you access to newer Android features like Vulkan.
To test on a locally connected Android device, you can use our `droid` convenience script: