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

Side by Side Diff: build/download_nacl_toolchains.py

Issue 9323023: Support optional PNaCl download by bots. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Shim to run nacl toolchain download script only if there is a nacl dir.""" 6 """Shim to run nacl toolchain download script only if there is a nacl dir."""
7 7
8 import os 8 import os
9 import sys 9 import sys
10 10
11 11
12 def Main(args): 12 def Main(args):
13 # Exit early if disable_nacl=1. 13 # Exit early if disable_nacl=1.
14 if 'disable_nacl=1' in os.environ.get('GYP_DEFINES', ''): 14 if 'disable_nacl=1' in os.environ.get('GYP_DEFINES', ''):
15 return 0 15 return 0
16 script_dir = os.path.dirname(os.path.abspath(__file__)) 16 script_dir = os.path.dirname(os.path.abspath(__file__))
17 src_dir = os.path.dirname(script_dir) 17 src_dir = os.path.dirname(script_dir)
18 nacl_dir = os.path.join(src_dir, 'native_client') 18 nacl_dir = os.path.join(src_dir, 'native_client')
19 nacl_build_dir = os.path.join(nacl_dir, 'build') 19 nacl_build_dir = os.path.join(nacl_dir, 'build')
20 download_script = os.path.join(nacl_build_dir, 'download_toolchains.py') 20 download_script = os.path.join(nacl_build_dir, 'download_toolchains.py')
21 if not os.path.exists(download_script): 21 if not os.path.exists(download_script):
22 print "Can't find '%s'" % download_script 22 print "Can't find '%s'" % download_script
23 print 'Presumably you are intentionally building without NativeClient.' 23 print 'Presumably you are intentionally building without NativeClient.'
24 print 'Skipping NativeClient toolchain download.' 24 print 'Skipping NativeClient toolchain download.'
25 sys.exit(0) 25 sys.exit(0)
26 sys.path.insert(0, nacl_build_dir) 26 sys.path.insert(0, nacl_build_dir)
27 import download_toolchains 27 import download_toolchains
28
29 # TODO (robertm): Finish getting PNaCl ready for prime time.
30 # BUG:
31 # We remove this --optional-pnacl argument, and instead replace it with
32 # --no-pnacl for most cases. However, if the bot name is the pnacl_sdk
33 # bot then we will go ahead and download it. This prevents increasing the
34 # gclient sync time for developers, or standard Chrome bots.
35 if '--optional-pnacl' in args:
36 args.remove('--optional-pnacl')
37 if os.environ.get('BUILDBOT_BUILDERNAME', '') == 'linux_pnacl_sdk':
38 print '\n*** DOWNLOADING PNACL TOOLCHAIN ***\n'
39 else:
40 args.append('--no-pnacl')
41
28 download_toolchains.Main(args) 42 download_toolchains.Main(args)
29 return 0 43 return 0
30 44
31 45
32 if __name__ == '__main__': 46 if __name__ == '__main__':
33 sys.exit(Main(sys.argv[1:])) 47 sys.exit(Main(sys.argv[1:]))
48
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698