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

Side by Side Diff: build/config/mac/xcrun.py

Issue 2401573005: Clean up some GN/hermetic build changes. (Closed)
Patch Set: More fixes. 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/config/mac/compile_xib.py ('k') | build/toolchain/toolchain.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import argparse 5 import argparse
6 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 9
10 if __name__ == '__main__': 10 if __name__ == '__main__':
11 parser = argparse.ArgumentParser( 11 parser = argparse.ArgumentParser(
12 description='A script to execute a command via xcrun.') 12 description='A script to execute a command via xcrun.')
13 parser.add_argument('--stamp', action='store', type=str, 13 parser.add_argument('--stamp', action='store', type=str,
14 help='Write a stamp file to this path on success.') 14 help='Write a stamp file to this path on success.')
15 parser.add_argument('--developer_dir', required=False, 15 parser.add_argument('--developer_dir', required=False,
16 help='Path to Xcode.') 16 help='Path to Xcode.')
17 args, unknown_args = parser.parse_known_args() 17 args, unknown_args = parser.parse_known_args()
18 18
19 if (args.developer_dir): 19 if args.developer_dir:
20 os.environ['DEVELOPER_DIR'] = args.developer_dir 20 os.environ['DEVELOPER_DIR'] = args.developer_dir
21 21
22 rv = subprocess.check_call(['xcrun'] + unknown_args) 22 rv = subprocess.check_call(['xcrun'] + unknown_args)
23 if rv == 0 and args.stamp: 23 if rv == 0 and args.stamp:
24 if os.path.exists(args.stamp): 24 if os.path.exists(args.stamp):
25 os.unlink(args.stamp) 25 os.unlink(args.stamp)
26 open(args.stamp, 'w+').close() 26 open(args.stamp, 'w+').close()
27 27
28 sys.exit(rv) 28 sys.exit(rv)
OLDNEW
« no previous file with comments | « build/config/mac/compile_xib.py ('k') | build/toolchain/toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698