Lines Matching full:gn
11 Skia uses [GN](https://chromium.googlesource.com/chromium/src/tools/gn/) to
30 a GN argument that looks something like `skia_use_foo` for appropriate `foo`.
53 `--args='cc="clang" cxx="clang++"'` GN build arguments, as illustrated in
57 If you do not specify `cc` and `cxx` in your gn arguments, Skia will default to
62 Run `gn gen` to generate your build files. As arguments to `gn gen`, pass a name
68 bin/gn gen out/Static --args='is_official_build=true'
74 bin/gn gen out/Shared --args='is_official_build=true is_component_build=true'
77 If you find that you don't have `bin/gn`, make sure you've run:
83 For a list of available build arguments, take a look at `gn/skia.gni`, or run:
86 bin/gn args out/Debug --list
89 GN allows multiple build folders to coexist; each build can be configured
93 bin/gn gen out/Debug
94 bin/gn gen out/Release --args='is_debug=false'
95 bin/gn gen out/Clang --args='cc="clang" cxx="clang++"'
96 bin/gn gen out/Cached --args='cc_wrapper="ccache"'
97 bin/gn gen out/RTTI --args='extra_cflags_cc=["-frtti"]'
117 gn ls out/Debug
150 When generating your GN build files, pass the path to your `ndk` and your
154 bin/gn gen out/arm --args='ndk="/tmp/ndk" target_cpu="arm"'
155 bin/gn gen out/arm64 --args='ndk="/tmp/ndk" target_cpu="arm64"'
156 bin/gn gen out/x64 --args='ndk="/tmp/ndk" target_cpu="x64"'
157 bin/gn gen out/x86 --args='ndk="/tmp/ndk" target_cpu="x86"'
201 Once those files are in place, generate the GN args that resemble the following:
274 Mac users may want to pass `--ide=xcode` to `bin/gn gen` to generate an Xcode
277 Mac GN builds assume an Intel CPU by default. If you are building for Apple
278 Silicon (M1 and newer) instead, add a gn arg to set `target_cpu="arm64"`:
281 bin/gn gen out/AppleSilicon --args='target_cpu="arm64"'
297 Run GN to generate your build files. Set `target_os="ios"` to build for iOS.
304 bin/gn gen out/ios64 --args='target_os="ios"'
305 bin/gn gen out/ios32 --args='target_os="ios" target_cpu="arm"'
306 bin/gn gen out/iossim-apple --args='target_os="ios" target_cpu="arm64" ios_use_simulator=true'
307 bin/gn gen out/iossim-intel --args='target_os="ios" target_cpu="x64"'
316 set the GN args `skia_ios_identity` to match your code signing identity and
343 `bin/gn gen`. If you are using Xcode version 10 or later, you may need to go to
358 Skia can build on Windows with Visual Studio 2017 or 2019. If GN is unable to
360 pass your `VC` path to GN via `win_vc`.
371 You can then pass the VC and SDK paths to GN by setting your GN args:
388 Setting the `cc` and `cxx` gn args is _not_ sufficient to build with clang-cl.
402 Clang, add this GN argument as well:
410 If you use Visual Studio, you may want to pass `--ide=vs` to `bin/gn gen` to
411 generate `all.sln`. That solution will exist within the GN directory for the
414 If you want a Visual Studio Solution that supports multiple GN configurations,
415 there is a helper script. It requires that all of your GN directories be inside
416 the `out` directory. First, create all of your GN configurations as usual. Pass
417 `--ide=vs` when running `bin/gn gen` for each one. Then:
420 python3 gn/gn_meta_sln.py
424 `out/sln/skia.sln`. It has one solution configuration for each GN configuration,
438 To use that toolchain, set the `target_cpu` GN argument to `"arm64"`. Note that
443 bin/gn gen out/win-arm64 --args='target_cpu="arm64" skia_use_angle=true'
452 We have added a GN-to-CMake translator mainly for use with IDEs that like CMake
456 bin/gn gen out/config --ide=json --json-ide-script=../../gn/gn_to_cmake.py