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

Side by Side Diff: tools/buildtools/update.py

Issue 3005903002: [infra] Roll clang toolchain forward (Closed)
Patch Set: Force rebuild on toolchain update Created 3 years, 3 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 | « build/config/compiler/BUILD.gn ('k') | 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 2017 The Dart project authors. All rights reserved. 2 # Copyright 2017 The Dart project 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 """Pulls down tools required to build Dart.""" 6 """Pulls down tools required to build Dart."""
7 7
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import shutil 10 import shutil
11 import sys 11 import sys
12 12
13 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) 13 THIS_DIR = os.path.abspath(os.path.dirname(__file__))
14 DART_ROOT = os.path.abspath(os.path.join(THIS_DIR, '..', '..')) 14 DART_ROOT = os.path.abspath(os.path.join(THIS_DIR, '..', '..'))
15 BUILDTOOLS = os.path.join(DART_ROOT, 'buildtools') 15 BUILDTOOLS = os.path.join(DART_ROOT, 'buildtools')
16 TOOLS_BUILDTOOLS = os.path.join(DART_ROOT, 'tools', 'buildtools') 16 TOOLS_BUILDTOOLS = os.path.join(DART_ROOT, 'tools', 'buildtools')
17 TOOLCHAIN = os.path.join(BUILDTOOLS, 'toolchain') 17 TOOLCHAIN = os.path.join(BUILDTOOLS, 'toolchain')
18 18
19 sys.path.insert(0, os.path.join(DART_ROOT, 'tools')) 19 sys.path.insert(0, os.path.join(DART_ROOT, 'tools'))
20 import find_depot_tools 20 import find_depot_tools
21 21
22 DEPOT_PATH = find_depot_tools.add_depot_tools_to_path() 22 DEPOT_PATH = find_depot_tools.add_depot_tools_to_path()
23 23
24 24
25 def Update(): 25 def Update():
26 path = os.path.join(BUILDTOOLS, 'update.sh') 26 path = os.path.join(BUILDTOOLS, 'update.sh')
27 command = ['/bin/bash', path, '--toolchain', '--gn'] 27 command = ['/bin/bash', path, '--clang', '--gn']
28 return subprocess.call(command, cwd=DART_ROOT) 28 return subprocess.call(command, cwd=DART_ROOT)
29 29
30 30
31 def UpdateGNOnWindows(): 31 def UpdateGNOnWindows():
32 sha1_file = os.path.join(BUILDTOOLS, 'win', 'gn.exe.sha1') 32 sha1_file = os.path.join(BUILDTOOLS, 'win', 'gn.exe.sha1')
33 downloader_script = os.path.join( 33 downloader_script = os.path.join(
34 DEPOT_PATH, 'download_from_google_storage.py') 34 DEPOT_PATH, 'download_from_google_storage.py')
35 download_cmd = [ 35 download_cmd = [
36 'python', 36 'python',
37 downloader_script, 37 downloader_script,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if result != 0: 95 if result != 0:
96 return result 96 return result
97 return UpdateClangFormatOnWindows() 97 return UpdateClangFormatOnWindows()
98 if Update() != 0: 98 if Update() != 0:
99 return 1 99 return 1
100 return CopyClangFormat() 100 return CopyClangFormat()
101 101
102 102
103 if __name__ == '__main__': 103 if __name__ == '__main__':
104 sys.exit(main(sys.argv)) 104 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698