Kevin Lubick | fe6b489 | 2018-06-05 17:21:30 -0400 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | # Copyright 2018 Google, LLC |
| 3 | # |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | |
| 7 | |
| 8 | set +e |
| 9 | |
| 10 | mkdir -p /skia/out/with-swift-shader |
| 11 | |
| 12 | echo ' |
| 13 | cc = "clang" |
| 14 | cxx = "clang++" |
| 15 | skia_use_egl = true |
| 16 | is_debug = false |
| 17 | skia_use_system_freetype2 = false |
| 18 | extra_cflags = [ |
| 19 | "-I/tmp/swiftshader/include", |
| 20 | "-DGR_EGL_TRY_GLES3_THEN_GLES2", |
| 21 | "-g0", |
| 22 | ] |
| 23 | extra_ldflags = [ |
| 24 | "-L/usr/local/lib", |
| 25 | "-Wl,-rpath", |
| 26 | "-Wl,/usr/local/lib" |
| 27 | ] ' > /skia/out/with-swift-shader/args.gn |
| 28 | |
| 29 | # /skia is where the host Skia checkout is linked to in the container |
| 30 | cd /skia |
| 31 | if [ "sync-deps" = "$1" ]; then |
| 32 | python tools/git-sync-deps |
| 33 | fi |
| 34 | ./bin/fetch-gn |
| 35 | ./bin/gn gen out/with-swift-shader |
| 36 | /tmp/depot_tools/ninja -C out/with-swift-shader |