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

Side by Side Diff: tools/cr/cr/actions/gyp.py

Issue 142933004: [cr tool] Make context implicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 9 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """A module to add gyp support to cr.""" 5 """A module to add gyp support to cr."""
6 6
7 import cr 7 import cr
8 8
9 9
10 class GypPrepareOut(cr.PrepareOut): 10 class GypPrepareOut(cr.PrepareOut):
11 """A prepare action that runs gyp whenever you select an output directory.""" 11 """A prepare action that runs gyp whenever you select an output directory."""
12 12
13 ENABLED = cr.Config.From( 13 ENABLED = cr.Config.From(
14 GYP_GENERATORS='ninja', 14 GYP_GENERATORS='ninja',
15 GYP_GENERATOR_FLAGS='output_dir={CR_OUT_BASE} config={CR_BUILDTYPE}', 15 GYP_GENERATOR_FLAGS='output_dir={CR_OUT_BASE} config={CR_BUILDTYPE}',
16 ) 16 )
17 17
18 def Prepare(self, context): 18 def Prepare(self):
19 if context.verbose >= 1: 19 if cr.context.verbose >= 1:
20 print context.Substitute('Invoking gyp with {GYP_GENERATOR_FLAGS}') 20 print cr.context.Substitute('Invoking gyp with {GYP_GENERATOR_FLAGS}')
21 cr.Host.Execute( 21 cr.Host.Execute(
22 context,
23 '{CR_SRC}/build/gyp_chromium', 22 '{CR_SRC}/build/gyp_chromium',
24 '--depth={CR_SRC}', 23 '--depth={CR_SRC}',
25 '--check' 24 '--check'
26 ) 25 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698