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

Side by Side Diff: slave/skia_slave_scripts/flavor_utils/nacl_build_step_utils.py

Issue 344183004: Use new common utils where possible. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: rebase Created 6 years, 5 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ Utilities for NaCl build steps. """ 6 """ Utilities for NaCl build steps. """
7 7
8 from default_build_step_utils import DefaultBuildStepUtils 8 from default_build_step_utils import DefaultBuildStepUtils
9 from utils import shell_utils 9 from py.utils import shell_utils
10 10
11 import os 11 import os
12 12
13 13
14 ENV_VAR = 'NACL_SDK_ROOT' 14 ENV_VAR = 'NACL_SDK_ROOT'
15 15
16 16
17 class NaclBuildStepUtils(DefaultBuildStepUtils): 17 class NaclBuildStepUtils(DefaultBuildStepUtils):
18 def Compile(self, target): 18 def Compile(self, target):
19 os.environ[ENV_VAR] = self._step.args['nacl_sdk_root'] 19 os.environ[ENV_VAR] = self._step.args['nacl_sdk_root']
20 cmd = [os.path.join('platform_tools', 'nacl', 'nacl_make'), 20 cmd = [os.path.join('platform_tools', 'nacl', 'nacl_make'),
21 target, 'BUILDTYPE=%s' % self._step.configuration, 21 target, 'BUILDTYPE=%s' % self._step.configuration,
22 ] 22 ]
23 cmd.extend(self._step.default_make_flags) 23 cmd.extend(self._step.default_make_flags)
24 if os.name != 'nt': 24 if os.name != 'nt':
25 try: 25 try:
26 ccache = shell_utils.run(['which', 'ccache'], echo=False) 26 ccache = shell_utils.run(['which', 'ccache'], echo=False)
27 if ccache: 27 if ccache:
28 cmd.append('--use-ccache') 28 cmd.append('--use-ccache')
29 except Exception: 29 except Exception:
30 pass 30 pass
31 cmd.extend(self._step.make_flags) 31 cmd.extend(self._step.make_flags)
32 shell_utils.run(cmd) 32 shell_utils.run(cmd)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698