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 | |
48 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): | 41 if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): |
49 print 'Skipping gyp_webrtc due to GYP_CHROMIUM_NO_ACTION env var.' | 42 print 'Skipping gyp_webrtc due to GYP_CHROMIUM_NO_ACTION env var.' |
50 sys.exit(0) | 43 sys.exit(0) |
51 | 44 |
52 if 'SKIP_WEBRTC_GYP_ENV' not in os.environ: | 45 if 'SKIP_WEBRTC_GYP_ENV' not in os.environ: |
53 # Update the environment based on webrtc.gyp_env | 46 # Update the environment based on webrtc.gyp_env |
54 gyp_env_path = os.path.join(os.path.dirname(checkout_root), | 47 gyp_env_path = os.path.join(os.path.dirname(checkout_root), |
55 'webrtc.gyp_env') | 48 'webrtc.gyp_env') |
56 gyp_helper.apply_gyp_environment_from_file(gyp_env_path) | 49 gyp_helper.apply_gyp_environment_from_file(gyp_env_path) |
57 | 50 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 'GYP_CROSSCOMPILE' not in os.environ)): | 93 'GYP_CROSSCOMPILE' not in os.environ)): |
101 os.environ['GYP_CROSSCOMPILE'] = '1' | 94 os.environ['GYP_CROSSCOMPILE'] = '1' |
102 | 95 |
103 args.extend(['-I' + i for i in | 96 args.extend(['-I' + i for i in |
104 gyp_chromium.additional_include_files(supplemental_includes, | 97 gyp_chromium.additional_include_files(supplemental_includes, |
105 args)]) | 98 args)]) |
106 | 99 |
107 # Set the gyp depth variable to the root of the checkout. | 100 # Set the gyp depth variable to the root of the checkout. |
108 args.append('--depth=' + os.path.relpath(checkout_root)) | 101 args.append('--depth=' + os.path.relpath(checkout_root)) |
109 | 102 |
110 if not use_analyzer: | 103 print 'Updating projects from gyp files...' |
111 print 'Updating projects from gyp files...' | 104 sys.stdout.flush() |
112 sys.stdout.flush() | |
113 | 105 |
114 # Off we go... | 106 # Off we go... |
115 gyp_rc = gyp.main(args) | 107 gyp_rc = gyp.main(args) |
116 | 108 |
117 if vs2013_runtime_dll_dirs and not use_analyzer: | 109 if vs2013_runtime_dll_dirs: |
118 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 110 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
119 vs_toolchain.CopyVsRuntimeDlls( | 111 vs_toolchain.CopyVsRuntimeDlls( |
120 os.path.join(checkout_root, gyp_chromium.GetOutputDirectory()), | 112 os.path.join(checkout_root, gyp_chromium.GetOutputDirectory()), |
121 (x86_runtime, x64_runtime)) | 113 (x86_runtime, x64_runtime)) |
122 | 114 |
123 sys.exit(gyp_rc) | 115 sys.exit(gyp_rc) |
OLD | NEW |