| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 3 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 4 # | 4 # |
| 5 # Use of this source code is governed by a BSD-style license | 5 # Use of this source code is governed by a BSD-style license |
| 6 # that can be found in the LICENSE file in the root of the source | 6 # that can be found in the LICENSE file in the root of the source |
| 7 # tree. An additional intellectual property rights grant can be found | 7 # tree. An additional intellectual property rights grant can be found |
| 8 # in the file PATENTS. All contributing project authors may | 8 # in the file PATENTS. All contributing project authors may |
| 9 # be found in the AUTHORS file in the root of the source tree. | 9 # be found in the AUTHORS file in the root of the source tree. |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 """Returns a list of the supplemental files that are included in all GYP | 31 """Returns a list of the supplemental files that are included in all GYP |
| 32 sources.""" | 32 sources.""" |
| 33 # Can't use the one in gyp_chromium since the directory location of the root | 33 # Can't use the one in gyp_chromium since the directory location of the root |
| 34 # is different. | 34 # is different. |
| 35 return glob.glob(os.path.join(checkout_root, '*', 'supplement.gypi')) | 35 return glob.glob(os.path.join(checkout_root, '*', 'supplement.gypi')) |
| 36 | 36 |
| 37 | 37 |
| 38 if __name__ == '__main__': | 38 if __name__ == '__main__': |
| 39 args = sys.argv[1:] | 39 args = sys.argv[1:] |
| 40 | 40 |
| 41 use_analyzer = len(args) and args[0] == '--analyzer' |
| 42 if use_analyzer: |
| 43 args.pop(0) |
| 44 os.environ['GYP_GENERATORS'] = 'analyzer' |
| 45 args.append('-Gconfig_path=' + args.pop(0)) |
| 46 args.append('-Ganalyzer_output_path=' + args.pop(0)) |
| 47 |
| 41 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): | 48 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): |
| 42 print 'Skipping gyp_webrtc due to GYP_CHROMIUM_NO_ACTION env var.' | 49 print 'Skipping gyp_webrtc due to GYP_CHROMIUM_NO_ACTION env var.' |
| 43 sys.exit(0) | 50 sys.exit(0) |
| 44 | 51 |
| 45 if 'SKIP_WEBRTC_GYP_ENV' not in os.environ: | 52 if 'SKIP_WEBRTC_GYP_ENV' not in os.environ: |
| 46 # Update the environment based on webrtc.gyp_env | 53 # Update the environment based on webrtc.gyp_env |
| 47 gyp_env_path = os.path.join(os.path.dirname(checkout_root), | 54 gyp_env_path = os.path.join(os.path.dirname(checkout_root), |
| 48 'webrtc.gyp_env') | 55 'webrtc.gyp_env') |
| 49 gyp_helper.apply_gyp_environment_from_file(gyp_env_path) | 56 gyp_helper.apply_gyp_environment_from_file(gyp_env_path) |
| 50 | 57 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 'GYP_CROSSCOMPILE' not in os.environ)): | 100 'GYP_CROSSCOMPILE' not in os.environ)): |
| 94 os.environ['GYP_CROSSCOMPILE'] = '1' | 101 os.environ['GYP_CROSSCOMPILE'] = '1' |
| 95 | 102 |
| 96 args.extend(['-I' + i for i in | 103 args.extend(['-I' + i for i in |
| 97 gyp_chromium.additional_include_files(supplemental_includes, | 104 gyp_chromium.additional_include_files(supplemental_includes, |
| 98 args)]) | 105 args)]) |
| 99 | 106 |
| 100 # Set the gyp depth variable to the root of the checkout. | 107 # Set the gyp depth variable to the root of the checkout. |
| 101 args.append('--depth=' + os.path.relpath(checkout_root)) | 108 args.append('--depth=' + os.path.relpath(checkout_root)) |
| 102 | 109 |
| 103 print 'Updating projects from gyp files...' | 110 if not use_analyzer: |
| 104 sys.stdout.flush() | 111 print 'Updating projects from gyp files...' |
| 112 sys.stdout.flush() |
| 105 | 113 |
| 106 # Off we go... | 114 # Off we go... |
| 107 gyp_rc = gyp.main(args) | 115 gyp_rc = gyp.main(args) |
| 108 | 116 |
| 109 if vs2013_runtime_dll_dirs: | 117 if vs2013_runtime_dll_dirs and not use_analyzer: |
| 110 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 118 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
| 111 vs_toolchain.CopyVsRuntimeDlls( | 119 vs_toolchain.CopyVsRuntimeDlls( |
| 112 os.path.join(checkout_root, gyp_chromium.GetOutputDirectory()), | 120 os.path.join(checkout_root, gyp_chromium.GetOutputDirectory()), |
| 113 (x86_runtime, x64_runtime)) | 121 (x86_runtime, x64_runtime)) |
| 114 | 122 |
| 115 sys.exit(gyp_rc) | 123 sys.exit(gyp_rc) |
| OLD | NEW |