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

Side by Side Diff: ios/build/tools/setup-gn.py

Issue 2804633002: [ios] Fix build instruction and scripts. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 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 import argparse 6 import argparse
7 import convert_gn_xcodeproj 7 import convert_gn_xcodeproj
8 import errno 8 import errno
9 import os 9 import os
10 import re 10 import re
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 goma_dir = self._settings.getstring('goma', 'install') 89 goma_dir = self._settings.getstring('goma', 'install')
90 if goma_dir: 90 if goma_dir:
91 args.append(('goma_dir', '"%s"' % os.path.expanduser(goma_dir))) 91 args.append(('goma_dir', '"%s"' % os.path.expanduser(goma_dir)))
92 92
93 args.append(('is_debug', self._config == 'Debug')) 93 args.append(('is_debug', self._config == 'Debug'))
94 args.append(('enable_dsyms', self._config in ('Profile', 'Official'))) 94 args.append(('enable_dsyms', self._config in ('Profile', 'Official')))
95 args.append(('enable_stripping', 'enable_dsyms')) 95 args.append(('enable_stripping', 'enable_dsyms'))
96 args.append(('is_official_build', self._config == 'Official')) 96 args.append(('is_official_build', self._config == 'Official'))
97 args.append(('is_chrome_branded', 'is_official_build')) 97 args.append(('is_chrome_branded', 'is_official_build'))
98 args.append(('use_xcode_clang', 'is_official_build')) 98 args.append(('use_xcode_clang', 'is_official_build'))
99 if os.environ.get('FORCE_MAC_TOOLCHAIN'): 99 if os.environ.get('FORCE_MAC_TOOLCHAIN', '0') == '1':
100 args.append(('use_system_xcode', False)) 100 args.append(('use_system_xcode', False))
101 101
102 cpu_values = self.TARGET_CPU_VALUES[self._target] 102 cpu_values = self.TARGET_CPU_VALUES[self._target]
103 build_arch = self._settings.getstring('build', 'arch') 103 build_arch = self._settings.getstring('build', 'arch')
104 if build_arch == 'fat': 104 if build_arch == 'fat':
105 target_cpu = cpu_values[self.FAT_BUILD_DEFAULT_ARCH] 105 target_cpu = cpu_values[self.FAT_BUILD_DEFAULT_ARCH]
106 args.append(('target_cpu', target_cpu)) 106 args.append(('target_cpu', target_cpu))
107 args.append(('additional_target_cpus', 107 args.append(('additional_target_cpus',
108 [cpu for cpu in cpu_values.itervalues() if cpu != target_cpu])) 108 [cpu for cpu in cpu_values.itervalues() if cpu != target_cpu]))
109 else: 109 else:
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 out_dir = os.path.join(args.root, 'out') 339 out_dir = os.path.join(args.root, 'out')
340 if not os.path.isdir(out_dir): 340 if not os.path.isdir(out_dir):
341 os.makedirs(out_dir) 341 os.makedirs(out_dir)
342 342
343 GenerateXcodeProject(gn_path, args.root, out_dir, settings) 343 GenerateXcodeProject(gn_path, args.root, out_dir, settings)
344 GenerateGnBuildRules(gn_path, args.root, out_dir, settings) 344 GenerateGnBuildRules(gn_path, args.root, out_dir, settings)
345 345
346 346
347 if __name__ == '__main__': 347 if __name__ == '__main__':
348 sys.exit(Main(sys.argv[1:])) 348 sys.exit(Main(sys.argv[1:]))
OLDNEW
« docs/ios/build_instructions.md ('K') | « docs/ios/build_instructions.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698