| OLD | NEW |
| 1 GN | 1 GN |
| 2 ===== | 2 ===== |
| 3 | 3 |
| 4 [GN](https://chromium.googlesource.com/chromium/src/tools/gn/) | 4 [GN](https://chromium.googlesource.com/chromium/src/tools/gn/) |
| 5 is a new meta-build system originally designed to replace GYP in Chromium. | 5 is a new meta-build system originally designed to replace GYP in Chromium. |
| 6 | 6 |
| 7 You can build Skia using GN in a limited number of configurations. We expect | 7 You can build Skia using GN in a limited number of configurations. We expect |
| 8 that as that limited number rises, GN will become the preferred, and then only, | 8 that as that limited number rises, GN will become the preferred, and then only, |
| 9 way to build Skia. | 9 way to build Skia. |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 gclient sync && bin/fetch-gn | 28 gclient sync && bin/fetch-gn |
| 29 | 29 |
| 30 # Run GN to generate your build files. | 30 # Run GN to generate your build files. |
| 31 gn gen out/Static --args='is_official_build=true' | 31 gn gen out/Static --args='is_official_build=true' |
| 32 gn gen out/Shared --args='is_official_build=true is_component_build=true' | 32 gn gen out/Shared --args='is_official_build=true is_component_build=true' |
| 33 | 33 |
| 34 # GN allows fine-grained settings for developers and special situations. | 34 # GN allows fine-grained settings for developers and special situations. |
| 35 gn gen out/Debug | 35 gn gen out/Debug |
| 36 gn gen out/Release --args='is_debug=false' | 36 gn gen out/Release --args='is_debug=false' |
| 37 gn gen out/Clang --args='cc="clang" cxx="clang++"' | 37 gn gen out/Clang --args='cc="clang" cxx="clang++"' |
| 38 gn gen out/Cached --args='compiler_prefix="ccache"' | 38 gn gen out/Cached --args='cc_wrapper="ccache"' |
| 39 gn gen out/RTTI --args='extra_cflags_cc="-frtti"' | 39 gn gen out/RTTI --args='extra_cflags_cc="-frtti"' |
| 40 | 40 |
| 41 # To see all the current GN arguments, run | 41 # To see all the current GN arguments, run |
| 42 gn args out/Debug --list | 42 gn args out/Debug --list |
| 43 | 43 |
| 44 # Build | 44 # Build |
| 45 ninja -C out/Static | 45 ninja -C out/Static |
| 46 ninja -C out/Shared | 46 ninja -C out/Shared |
| 47 ninja -C out/Debug | 47 ninja -C out/Debug |
| 48 ninja -C out/Release | 48 ninja -C out/Release |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 To test on an Android device, push the binary and `resources` over, | 84 To test on an Android device, push the binary and `resources` over, |
| 85 and run it as normal. You may find `bin/droid` convenient. | 85 and run it as normal. You may find `bin/droid` convenient. |
| 86 | 86 |
| 87 <!--?prettify lang=sh?--> | 87 <!--?prettify lang=sh?--> |
| 88 | 88 |
| 89 ninja -C out/arm64 | 89 ninja -C out/arm64 |
| 90 adb push out/arm64/dm /data/local/tmp | 90 adb push out/arm64/dm /data/local/tmp |
| 91 adb push resources /data/local/tmp | 91 adb push resources /data/local/tmp |
| 92 adb shell "cd /data/local/tmp; ./dm --src gm --config gpu" | 92 adb shell "cd /data/local/tmp; ./dm --src gm --config gpu" |
| OLD | NEW |