| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 ] | 196 ] |
| 197 for i in remap_cases: | 197 for i in remap_cases: |
| 198 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: | 198 if i[0] in vars_dict and vars_dict[i[0]] == i[1]: |
| 199 gn_args += ' ' + i[2] | 199 gn_args += ' ' + i[2] |
| 200 | 200 |
| 201 # These string arguments get passed directly as GN strings. | 201 # These string arguments get passed directly as GN strings. |
| 202 for v in ['android_src', 'windows_sdk_path']: | 202 for v in ['android_src', 'windows_sdk_path']: |
| 203 if v in vars_dict: | 203 if v in vars_dict: |
| 204 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) | 204 gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v]) |
| 205 | 205 |
| 206 # gomadir is renamed goma_dir in the GN build. |
| 207 if 'gomadir' in vars_dict: |
| 208 gn_args += ' goma_dir="%s"' % vars_dict['gomadir'] |
| 209 |
| 206 # These arguments get passed directly as integers (avoiding the quoting and | 210 # These arguments get passed directly as integers (avoiding the quoting and |
| 207 # escaping of the string ones above). | 211 # escaping of the string ones above). |
| 208 for v in ['arm_version']: | 212 for v in ['arm_version']: |
| 209 if v in vars_dict: | 213 if v in vars_dict: |
| 210 gn_args += ' %s=%s' % (v, vars_dict[v]) | 214 gn_args += ' %s=%s' % (v, vars_dict[v]) |
| 211 | 215 |
| 212 # Some other flags come from GYP environment variables. | 216 # Some other flags come from GYP environment variables. |
| 213 gyp_msvs_version = os.environ.get('GYP_MSVS_VERSION', '') | 217 gyp_msvs_version = os.environ.get('GYP_MSVS_VERSION', '') |
| 214 if gyp_msvs_version: | 218 if gyp_msvs_version: |
| 215 gn_args += ' visual_studio_version=' + EscapeStringForGN(gyp_msvs_version) | 219 gn_args += ' visual_studio_version=' + EscapeStringForGN(gyp_msvs_version) |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 if not RunGN(supplemental_includes): | 395 if not RunGN(supplemental_includes): |
| 392 sys.exit(1) | 396 sys.exit(1) |
| 393 args.extend( | 397 args.extend( |
| 394 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) | 398 ['-I' + i for i in additional_include_files(supplemental_includes, args)]) |
| 395 | 399 |
| 396 print 'Updating projects from gyp files...' | 400 print 'Updating projects from gyp files...' |
| 397 sys.stdout.flush() | 401 sys.stdout.flush() |
| 398 | 402 |
| 399 # Off we go... | 403 # Off we go... |
| 400 sys.exit(gyp.main(args)) | 404 sys.exit(gyp.main(args)) |
| OLD | NEW |