Lines Matching +full:cross +full:- +full:ios +full:- +full:build
1 How to build Skia
10 `is_official_build` and Third-party Dependencies
11 ------------------------------------------------
16 This mode configures Skia in a way that's suitable to ship: an optimized build
17 with no debug symbols, dynamically linked against its third-party dependencies
20 In contrast, the developer-oriented default is an unoptimized build with full
21 debug symbols and all third-party dependencies built from source and embedded
24 Skia offers several features that make use of third-party libraries, like
25 libpng, libwebp, or libjpeg-turbo to decode images, or ICU and sftnly to subset
26 fonts. All these third-party dependencies are optional and can be controlled
30 If `skia_use_foo` is enabled, enabling `skia_use_system_foo` will build and
37 --------------------------------------
45 wrong with non-Clang compilers. So if this is a serious issue for you, please
49 ----------
51 Run GN to generate your build files.
53 bin/gn gen out/Static --args='is_official_build=true'
54 bin/gn gen out/Shared --args='is_official_build=true is_component_build=true'
58 python tools/git-sync-deps
60 GN allows fine-grained settings for developers and special situations.
63 bin/gn gen out/Release --args='is_debug=false'
64 bin/gn gen out/Clang --args='cc="clang" cxx="clang++"'
65 bin/gn gen out/Cached --args='cc_wrapper="ccache"'
66 bin/gn gen out/RTTI --args='extra_cflags_cc=["-frtti"]'
70 bin/gn args out/Debug --list
72 Having generated your build files, run Ninja to compile and link Skia.
74 ninja -C out/Static
75 ninja -C out/Shared
76 ninja -C out/Debug
77 ninja -C out/Release
78 ninja -C out/Clang
79 ninja -C out/Cached
80 ninja -C out/RTTI
87 -------
89 To build Skia for Android you need an [Android
95 python infra/bots/assets/android_ndk_linux/download.py -t /tmp/ndk
96 python infra/bots/assets/android_ndk_darwin/download.py -t /tmp/ndk
97 python infra/bots/assets/android_ndk_windows/download.py -t C:/ndk
99 When generating your GN build files, pass the path to your `ndk` and your
102 bin/gn gen out/arm --args='ndk="/tmp/ndk" target_cpu="arm"'
103 bin/gn gen out/arm64 --args='ndk="/tmp/ndk" target_cpu="arm64"'
104 bin/gn gen out/x64 --args='ndk="/tmp/ndk" target_cpu="x64"'
105 bin/gn gen out/x86 --args='ndk="/tmp/ndk" target_cpu="x86"'
113 ninja -C out/arm64
116 adb shell "cd /data/local/tmp; ./dm --src gm --config gl"
120 --------------
121 To cross-compile Skia for arm ChromeOS devices the following is needed:
123 - Clang 4 or newer
124 - An armhf sysroot
125 - The (E)GL lib files on the arm chromebook to link against.
131 python infra/bots/assets/clang_linux/download.py -t /opt/clang
132 python infra/bots/assets/armhf_sysroot/download.py -t /opt/armhf_sysroot
133 python infra/bots/assets/chromebook_arm_gles/download.py -t /opt/chromebook_arm_gles
134 python infra/bots/assets/chromebook_x86_64_gles/download.py -t /opt/chromebook_x86_64_gles
149 "--target=armv7a-linux-gnueabihf",
150 "--sysroot=/opt/armhf_sysroot/",
151 "-march=armv7-a",
152 "-mfpu=neon",
153 "-mthumb",
156 "--target=armv7a-linux-gnueabihf",
157 "--sysroot=/opt/armhf_sysroot",
158 "-I/opt/chromebook_arm_gles/include",
159 "-I/opt/armhf_sysroot/include/",
160 "-I/opt/armhf_sysroot/include/c++/4.8.4/",
161 "-I/opt/armhf_sysroot/include/c++/4.8.4/arm-linux-gnueabihf/",
162 "-DMESA_EGL_NO_X11_HEADERS",
163 "-funwind-tables",
166 "--sysroot=/opt/armhf_sysroot",
167 "-B/opt/armhf_sysroot/bin",
168 "-B/opt/armhf_sysroot/gcc-cross",
169 "-L/opt/armhf_sysroot/gcc-cross",
170 "-L/opt/armhf_sysroot/lib",
171 "-L/opt/chromebook_arm_gles/lib",
172 "--target=armv7a-linux-gnueabihf",
184 "-I/opt/clang/include/c++/v1/",
185 "-I/opt/chromebook_x86_64_gles/include",
186 "-DMESA_EGL_NO_X11_HEADERS",
187 "-DEGL_NO_IMAGE_EXTERNAL",
190 "-stdlib=libc++",
191 "-fuse-ld=lld",
192 "-L/opt/chromebook_x86_64_gles/lib",
207 sudo mount -i -o remount,exec /home/chronos
210 ---
212 Mac users may want to pass `--ide=xcode` to `bin/gn gen` to generate an Xcode project.
214 iOS section in How to build Skia
215 ---
217 Run GN to generate your build files. Set `target_os="ios"` to build for iOS.
218 This defaults to `target_cpu="arm64"`. Choosing `x64` targets the iOS simulator.
220 bin/gn gen out/ios64 --args='target_os="ios"'
221 bin/gn gen out/ios32 --args='target_os="ios" target_cpu="arm"'
222 bin/gn gen out/iossim --args='target_os="ios" target_cpu="x64"'
224 This will also package (and for devices, sign) iOS test binaries. This defaults to a
228 identities can be found by typing `security find-identity` on the command line. The name of the
231 For signed packages `ios-deploy` makes installing and running them on a device easy:
233 ios-deploy -b out/Debug/dm.app -d --args "--match foo"
235 Alternatively you can generate an Xcode project by passing `--ide=xcode` to `bin/gn gen`.
245 -------
247 Skia can build on Windows with Visual Studio 2017 or Visual Studio 2015 Update 3.
251 Skia can be compiled with the free [Build Tools for Visual Studio
252 2017](https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017).
256 python infra/bots/assets/win_toolchain/download.py -t C:/toolchain
263 This toolchain is the only way we support 32-bit builds, by also setting `target_cpu="x86"`.
266 The Skia build assumes that the PATHEXT environment variable contains ".EXE".
268 ### **Highly Recommended**: Build with clang-cl
273 Setting the `cc` and `cxx` gn args is _not_ sufficient to build with clang-cl. These variables
283 If you use Visual Studio, you may want to pass `--ide=vs` to `bin/gn gen` to
285 specific configuration, and will only build/run that configuration.
290 Pass `--ide=vs` when running `bin/gn gen` for each one. Then:
301 -------------
303 There is early, experimental support for [Windows 10 on ARM](https://docs.microsoft.com/en-us/windo…
311 bin/gn gen out/win-arm64 --args='target_cpu="arm64" skia_use_angle=true'
313 This will produce a build of Skia that can use the software or ANGLE backends, in DM. Viewer only w…
314 when launched with `--backend angle`, because the software backend tries to use OpenGL to display t…
318 -----
320 We have added a GN-to-CMake translator mainly for use with IDEs that like CMake
323 bin/gn gen out/config --ide=json --json-ide-script=../../gn/gn_to_cmake.py