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

Side by Side Diff: build/download_nacl_toolchains.py

Issue 735163002: Use the new nacl_core_sdk mode for package_version within Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 | « DEPS ('k') | chrome/test/nacl_test_injection/buildbot_chrome_nacl_stage.py » ('j') | 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 shutil 9 import shutil
10 import sys 10 import sys
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 print '\n*** DOWNLOADING PNACL TOOLCHAIN ***\n' 43 print '\n*** DOWNLOADING PNACL TOOLCHAIN ***\n'
44 else: 44 else:
45 args.extend(['--exclude', 'pnacl_newlib']) 45 args.extend(['--exclude', 'pnacl_newlib'])
46 46
47 # Only download the ARM gcc toolchain if we are building for ARM 47 # Only download the ARM gcc toolchain if we are building for ARM
48 # TODO(olonho): we need to invent more reliable way to get build 48 # TODO(olonho): we need to invent more reliable way to get build
49 # configuration info, to know if we're building for ARM. 49 # configuration info, to know if we're building for ARM.
50 if 'target_arch=arm' not in os.environ.get('GYP_DEFINES', ''): 50 if 'target_arch=arm' not in os.environ.get('GYP_DEFINES', ''):
51 args.extend(['--exclude', 'nacl_arm_newlib']) 51 args.extend(['--exclude', 'nacl_arm_newlib'])
52 52
53 args.extend(['--mode', 'nacl_core_sdk'])
53 args.append('sync') 54 args.append('sync')
54 package_version.main(args) 55 package_version.main(args)
55 56
56 # Because we are no longer extracting the toolchain, it is best to delete 57 # Because we are no longer extracting the toolchain, it is best to delete
57 # the old extracted ones so that no stale toolchains are left behind. This 58 # the old extracted ones so that no stale toolchains are left behind. This
58 # also would catch any stale code that happens to work because it is using 59 # also would catch any stale code that happens to work because it is using
59 # an old extracted toolchain that was left behind. 60 # an old extracted toolchain that was left behind.
60 toolchain_dir = os.path.join(nacl_dir, 'toolchain') 61 toolchain_dir = os.path.join(nacl_dir, 'toolchain')
61 for toolchain_item in os.listdir(toolchain_dir): 62 for toolchain_item in os.listdir(toolchain_dir):
62 toolchain_path = os.path.join(toolchain_dir, toolchain_item) 63 toolchain_path = os.path.join(toolchain_dir, toolchain_item)
63 if os.path.isdir(toolchain_path) and not toolchain_item.startswith('.'): 64 if os.path.isdir(toolchain_path) and not toolchain_item.startswith('.'):
64 shutil.rmtree(toolchain_path) 65 shutil.rmtree(toolchain_path)
65 66
66 return 0 67 return 0
67 68
68 69
69 if __name__ == '__main__': 70 if __name__ == '__main__':
70 sys.exit(Main(sys.argv[1:])) 71 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « DEPS ('k') | chrome/test/nacl_test_injection/buildbot_chrome_nacl_stage.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698