| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # This script is wrapper for Chromium that adds some support for how GYP | 7 # This script is wrapper for Chromium that adds some support for how GYP |
| 8 # is invoked by Chromium beyond what can be done in the gclient hooks. | 8 # is invoked by Chromium beyond what can be done in the gclient hooks. |
| 9 | 9 |
| 10 import glob | 10 import glob |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 ('asan', '1', 'is_asan=true'), | 216 ('asan', '1', 'is_asan=true'), |
| 217 ('lsan', '1', 'is_lsan=true'), | 217 ('lsan', '1', 'is_lsan=true'), |
| 218 ('msan', '1', 'is_msan=true'), | 218 ('msan', '1', 'is_msan=true'), |
| 219 ('tsan', '1', 'is_tsan=true'), | 219 ('tsan', '1', 'is_tsan=true'), |
| 220 ] | 220 ] |
| 221 for i in remap_cases: | 221 for i in remap_cases: |
| 222 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: | 222 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: |
| 223 gn_args += ' ' + i[2] | 223 gn_args += ' ' + i[2] |
| 224 | 224 |
| 225 # These string arguments get passed directly as GN strings. | 225 # These string arguments get passed directly as GN strings. |
| 226 for v in ['android_src', 'windows_sdk_path', 'arm_float_abi']: | 226 for v in ['android_src', 'arm_float_abi', 'ios_deployment_target', |
| 227 'ios_sdk_path', 'windows_sdk_path']: |
| 227 if v in vars_dict: | 228 if v in vars_dict: |
| 228 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) | 229 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) |
| 229 | 230 |
| 230 # gomadir is renamed goma_dir in the GN build. | 231 # gomadir is renamed goma_dir in the GN build. |
| 231 if 'gomadir' in vars_dict: | 232 if 'gomadir' in vars_dict: |
| 232 gn_args += ' goma_dir=%s' % EscapeStringForGN(vars_dict['gomadir']) | 233 gn_args += ' goma_dir=%s' % EscapeStringForGN(vars_dict['gomadir']) |
| 233 | 234 |
| 235 # Clear the "use_ios_simulator" flag if the ios_sdk_path is set and is |
| 236 # not a simulator SDK. This duplicates code done in GYP's xcode emulation. |
| 237 if 'ios_sdk_path' in vars_dict: |
| 238 if not os.path.basename(vars_dict['ios_sdk_path']).lower().startswith( |
| 239 'iphonesimulator'): |
| 240 gn_args += ' use_ios_simulator=false' |
| 241 |
| 242 |
| 234 # These arguments get passed directly as integers (avoiding the quoting and | 243 # These arguments get passed directly as integers (avoiding the quoting and |
| 235 # escaping of the string ones above). | 244 # escaping of the string ones above). |
| 236 for v in ['arm_version']: | 245 for v in ['arm_version']: |
| 237 if v in vars_dict: | 246 if v in vars_dict: |
| 238 gn_args += ' %s=%s' % (v, vars_dict[v]) | 247 gn_args += ' %s=%s' % (v, vars_dict[v]) |
| 239 | 248 |
| 240 # Some other flags come from GYP environment variables. | 249 # Some other flags come from GYP environment variables. |
| 241 gyp_msvs_version = os.environ.get('GYP_MSVS_VERSION', '') | 250 gyp_msvs_version = os.environ.get('GYP_MSVS_VERSION', '') |
| 242 if gyp_msvs_version: | 251 if gyp_msvs_version: |
| 243 gn_args += ' visual_studio_version=' + EscapeStringForGN(gyp_msvs_version) | 252 gn_args += ' visual_studio_version=' + EscapeStringForGN(gyp_msvs_version) |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 args.extend( | 437 args.extend( |
| 429 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) | 438 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) |
| 430 | 439 |
| 431 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) | 440 args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) |
| 432 | 441 |
| 433 print 'Updating projects from gyp files...' | 442 print 'Updating projects from gyp files...' |
| 434 sys.stdout.flush() | 443 sys.stdout.flush() |
| 435 | 444 |
| 436 # Off we go... | 445 # Off we go... |
| 437 sys.exit(gyp.main(args)) | 446 sys.exit(gyp.main(args)) |
| OLD | NEW |