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

Side by Side Diff: tools/clang/scripts/update.py

Issue 2412353003: Remove direct references to hermetic mac toolchain. (Closed)
Patch Set: Remove unused import. Created 4 years, 2 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/mac_toolchain.py ('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 (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 """This script is used to download prebuilt clang binaries. 6 """This script is used to download prebuilt clang binaries.
7 7
8 It is also used by package.py to build the prebuilt clang binaries.""" 8 It is also used by package.py to build the prebuilt clang binaries."""
9 9
10 import argparse 10 import argparse
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 def WriteStampFile(s, path=STAMP_FILE): 160 def WriteStampFile(s, path=STAMP_FILE):
161 """Write s to the stamp file.""" 161 """Write s to the stamp file."""
162 EnsureDirExists(os.path.dirname(path)) 162 EnsureDirExists(os.path.dirname(path))
163 with open(path, 'w') as f: 163 with open(path, 'w') as f:
164 f.write(s) 164 f.write(s)
165 f.write('\n') 165 f.write('\n')
166 166
167 167
168 def GetSvnRevision(svn_repo): 168 def GetSvnRevision(svn_repo):
169 """Returns current revision of the svn repo at svn_repo.""" 169 """Returns current revision of the svn repo at svn_repo."""
170 if sys.platform == 'darwin':
171 # mac_files toolchain must be set for hermetic builds.
172 root = os.path.dirname(os.path.dirname(os.path.dirname(
173 os.path.dirname(__file__))))
174 sys.path.append(os.path.join(root, 'build'))
175 import mac_toolchain
176
177 mac_toolchain.SetToolchainEnvironment()
178 svn_info = subprocess.check_output('svn info ' + svn_repo, shell=True) 170 svn_info = subprocess.check_output('svn info ' + svn_repo, shell=True)
justincohen 2016/10/13 20:34:22 I wonder what changed -- this used to fail before
erikchen 2016/10/13 20:42:48 The only thing I can think of is that when this fa
179 m = re.search(r'Revision: (\d+)', svn_info) 171 m = re.search(r'Revision: (\d+)', svn_info)
180 return m.group(1) 172 return m.group(1)
181 173
182 174
183 def RmTree(dir): 175 def RmTree(dir):
184 """Delete dir.""" 176 """Delete dir."""
185 def ChmodAndRetry(func, path, _): 177 def ChmodAndRetry(func, path, _):
186 # Subversion can leave read-only files around. 178 # Subversion can leave read-only files around.
187 if not os.access(path, os.W_OK): 179 if not os.access(path, os.W_OK):
188 os.chmod(path, stat.S_IWUSR) 180 os.chmod(path, stat.S_IWUSR)
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 args.force_local_build = True 892 args.force_local_build = True
901 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): 893 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''):
902 # Only build the Android ASan rt on ToT bots when targetting Android. 894 # Only build the Android ASan rt on ToT bots when targetting Android.
903 args.with_android = False 895 args.with_android = False
904 896
905 return UpdateClang(args) 897 return UpdateClang(args)
906 898
907 899
908 if __name__ == '__main__': 900 if __name__ == '__main__':
909 sys.exit(main()) 901 sys.exit(main())
OLDNEW
« no previous file with comments | « build/mac_toolchain.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698