OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """This script is wrapper for Chromium that adds some support for how GYP | 5 """This script is wrapper for Chromium that adds some support for how GYP |
6 is invoked by Chromium beyond what can be done in the gclient hooks. | 6 is invoked by Chromium beyond what can be done in the gclient hooks. |
7 """ | 7 """ |
8 | 8 |
9 import argparse | 9 import argparse |
10 import gc | 10 import gc |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 specified_includes.add(os.path.realpath(arg[2:])) | 174 specified_includes.add(os.path.realpath(arg[2:])) |
175 | 175 |
176 result = [] | 176 result = [] |
177 def AddInclude(path): | 177 def AddInclude(path): |
178 if os.path.realpath(path) not in specified_includes: | 178 if os.path.realpath(path) not in specified_includes: |
179 result.append(path) | 179 result.append(path) |
180 | 180 |
181 if os.environ.get('GYP_INCLUDE_FIRST') != None: | 181 if os.environ.get('GYP_INCLUDE_FIRST') != None: |
182 AddInclude(os.path.join(chrome_src, os.environ.get('GYP_INCLUDE_FIRST'))) | 182 AddInclude(os.path.join(chrome_src, os.environ.get('GYP_INCLUDE_FIRST'))) |
183 | 183 |
| 184 # Always include common.gypi. |
| 185 AddInclude(os.path.join(script_dir, 'common.gypi')) |
| 186 |
184 # Optionally add supplemental .gypi files if present. | 187 # Optionally add supplemental .gypi files if present. |
185 for supplement in supplemental_files: | 188 for supplement in supplemental_files: |
186 AddInclude(supplement) | 189 AddInclude(supplement) |
187 | 190 |
188 if os.environ.get('GYP_INCLUDE_LAST') != None: | 191 if os.environ.get('GYP_INCLUDE_LAST') != None: |
189 AddInclude(os.path.join(chrome_src, os.environ.get('GYP_INCLUDE_LAST'))) | 192 AddInclude(os.path.join(chrome_src, os.environ.get('GYP_INCLUDE_LAST'))) |
190 | 193 |
191 return result | 194 return result |
192 | 195 |
193 | 196 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 if vs2013_runtime_dll_dirs: | 352 if vs2013_runtime_dll_dirs: |
350 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 353 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
351 vs_toolchain.CopyVsRuntimeDlls( | 354 vs_toolchain.CopyVsRuntimeDlls( |
352 os.path.join(chrome_src, GetOutputDirectory()), | 355 os.path.join(chrome_src, GetOutputDirectory()), |
353 (x86_runtime, x64_runtime)) | 356 (x86_runtime, x64_runtime)) |
354 | 357 |
355 sys.exit(gyp_rc) | 358 sys.exit(gyp_rc) |
356 | 359 |
357 if __name__ == '__main__': | 360 if __name__ == '__main__': |
358 sys.exit(main()) | 361 sys.exit(main()) |
OLD | NEW |