Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: infra/bots/recipe_modules/skia/gn_flavor.py

Issue 2189713003: recipes: Add a GN flavor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « infra/bots/recipe_modules/skia/fake_specs.py ('k') | infra/bots/recipes/swarm_compile.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import default_flavor
6
7 """GN flavor utils, used for building Skia with GN."""
8 class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
9 def compile(self, target):
10 """Build Skia with GN."""
11 # Get the gn executable.
12 fetch_gn = self._skia_api.skia_dir.join('bin', 'fetch-gn')
13 self._skia_api.run(self._skia_api.m.step, 'fetch-gn', cmd=[fetch_gn],
14 cwd=self._skia_api.skia_dir)
15
16 is_debug = 'is_debug=true'
17 if self._skia_api.configuration != 'Debug':
18 is_debug = 'is_debug=false'
19 gn_args = [is_debug]
20
21 # Run gn gen.
22 gn_exe = 'gn'
23 if self._skia_api.m.platform.is_win:
24 gn_exe = 'gn.exe'
25 gn_gen = [gn_exe, 'gen', self.out_dir, '--args=%s' % ' '.join(gn_args)]
26 self._skia_api.run(self._skia_api.m.step, 'gn_gen', cmd=gn_gen,
27 cwd=self._skia_api.skia_dir)
28
29 # Run ninja.
30 ninja_cmd = ['ninja', '-C', self.out_dir]
31 self._skia_api.run(self._skia_api.m.step, 'compile %s' % target,
32 cmd=ninja_cmd,
33 cwd=self._skia_api.skia_dir)
OLDNEW
« no previous file with comments | « infra/bots/recipe_modules/skia/fake_specs.py ('k') | infra/bots/recipes/swarm_compile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698