| Index: site/user/quick/gn.md
|
| diff --git a/site/user/quick/gn.md b/site/user/quick/gn.md
|
| index 915a823526489182e672e56dc6cae72a0aab3ef9..ad7f1090a15b55f5d6e1f5396de72c24b176f0b6 100644
|
| --- a/site/user/quick/gn.md
|
| +++ b/site/user/quick/gn.md
|
| @@ -11,7 +11,7 @@ way to build Skia.
|
| Supported Features
|
| ----------
|
|
|
| - * Linux, Mac
|
| + * Linux, Mac, Android
|
| * Software and GL rendering
|
| * libskia.a, libskia.so
|
| * DM, nanobench
|
| @@ -29,14 +29,48 @@ guides. We diverge where they'd first run some command with "gyp" in it.
|
|
|
| # Run GN to generate your build files. Some examples.
|
| 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/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"'
|
|
|
| # Build
|
| - ninja -C out/Release
|
| 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.
|
| +
|
| +Android
|
| +-------
|
| +
|
| +To build Skia for Android you need an [Android
|
| +NDK](https://developer.android.com/ndk/index.html).
|
| +
|
| +If you do not have an NDK and have access to CIPD, you
|
| +can use one of these commands to fetch the NDK our bots use:
|
| +
|
| +<!--?prettify lang=sh?-->
|
| +
|
| + python infra/bots/assets/android_ndk_linux/download.py -t /tmp/ndk
|
| + python infra/bots/assets/android_ndk_darwin/download.py -t /tmp/ndk
|
| +
|
| +When generating your GN build files, pass the path to your `ndk` and your
|
| +desired `target_cpu`:
|
| +
|
| +<!--?prettify lang=sh?-->
|
| +
|
| + gn gen out/arm --args='ndk="/tmp/ndk" target_cpu="arm"'
|
| + gn gen out/arm64 --args='ndk="/tmp/ndk" target_cpu="arm64"'
|
| + gn gen out/mips64el --args='ndk="/tmp/ndk" target_cpu="mips64el"'
|
| + gn gen out/mipsel --args='ndk="/tmp/ndk" target_cpu="mipsel"'
|
| + gn gen out/x64 --args='ndk="/tmp/ndk" target_cpu="x64"'
|
| + gn gen out/x86 --args='ndk="/tmp/ndk" target_cpu="x86"'
|
| +
|
| +Other arguments like `is_debug` and `is_component_build` continue to work.
|
|
|