OLD | NEW |
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 Loading... |
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['FORCE_MAC_TOOLCHAIN']: |
| 100 args.append(('use_system_xcode', False)) |
99 | 101 |
100 cpu_values = self.TARGET_CPU_VALUES[self._target] | 102 cpu_values = self.TARGET_CPU_VALUES[self._target] |
101 build_arch = self._settings.getstring('build', 'arch') | 103 build_arch = self._settings.getstring('build', 'arch') |
102 if build_arch == 'fat': | 104 if build_arch == 'fat': |
103 target_cpu = cpu_values[self.FAT_BUILD_DEFAULT_ARCH] | 105 target_cpu = cpu_values[self.FAT_BUILD_DEFAULT_ARCH] |
104 args.append(('target_cpu', target_cpu)) | 106 args.append(('target_cpu', target_cpu)) |
105 args.append(('additional_target_cpus', | 107 args.append(('additional_target_cpus', |
106 [cpu for cpu in cpu_values.itervalues() if cpu != target_cpu])) | 108 [cpu for cpu in cpu_values.itervalues() if cpu != target_cpu])) |
107 else: | 109 else: |
108 args.append(('target_cpu', cpu_values[build_arch])) | 110 args.append(('target_cpu', cpu_values[build_arch])) |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 out_dir = os.path.join(args.root, 'out') | 339 out_dir = os.path.join(args.root, 'out') |
338 if not os.path.isdir(out_dir): | 340 if not os.path.isdir(out_dir): |
339 os.makedirs(out_dir) | 341 os.makedirs(out_dir) |
340 | 342 |
341 GenerateXcodeProject(gn_path, args.root, out_dir, settings) | 343 GenerateXcodeProject(gn_path, args.root, out_dir, settings) |
342 GenerateGnBuildRules(gn_path, args.root, out_dir, settings) | 344 GenerateGnBuildRules(gn_path, args.root, out_dir, settings) |
343 | 345 |
344 | 346 |
345 if __name__ == '__main__': | 347 if __name__ == '__main__': |
346 sys.exit(Main(sys.argv[1:])) | 348 sys.exit(Main(sys.argv[1:])) |
OLD | NEW |