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 argparse | 10 import argparse |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) | 24 sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) |
25 import gyp | 25 import gyp |
26 | 26 |
27 # Assume this file is in a one-level-deep subdirectory of the source root. | 27 # Assume this file is in a one-level-deep subdirectory of the source root. |
28 SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 28 SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
29 | 29 |
30 # Add paths so that pymod_do_main(...) can import files. | 30 # Add paths so that pymod_do_main(...) can import files. |
31 sys.path.insert(1, os.path.join(chrome_src, 'android_webview', 'tools')) | 31 sys.path.insert(1, os.path.join(chrome_src, 'android_webview', 'tools')) |
32 sys.path.insert(1, os.path.join(chrome_src, 'build', 'android', 'gyp')) | 32 sys.path.insert(1, os.path.join(chrome_src, 'build', 'android', 'gyp')) |
33 sys.path.insert(1, os.path.join(chrome_src, 'tools')) | |
34 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) | |
35 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) | |
36 sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) | 33 sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) |
37 sys.path.insert(1, os.path.join(chrome_src, 'chromecast', 'tools', 'build')) | 34 sys.path.insert(1, os.path.join(chrome_src, 'chromecast', 'tools', 'build')) |
38 sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) | 35 sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) |
39 sys.path.insert(1, os.path.join(chrome_src, 'native_client_sdk', 'src', | 36 sys.path.insert(1, os.path.join(chrome_src, 'native_client_sdk', 'src', |
40 'build_tools')) | 37 'build_tools')) |
41 sys.path.insert(1, os.path.join(chrome_src, 'remoting', 'tools', 'build')) | 38 sys.path.insert(1, os.path.join(chrome_src, 'remoting', 'tools', 'build')) |
42 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'liblouis')) | 39 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'liblouis')) |
43 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', | 40 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', |
44 'Source', 'build', 'scripts')) | 41 'Source', 'build', 'scripts')) |
| 42 sys.path.insert(1, os.path.join(chrome_src, 'tools')) |
| 43 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) |
| 44 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) |
45 | 45 |
46 # On Windows, Psyco shortens warm runs of build/gyp_chromium by about | 46 # On Windows, Psyco shortens warm runs of build/gyp_chromium by about |
47 # 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 | 47 # 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 |
48 # seconds. Conversely, memory usage of build/gyp_chromium with Psyco | 48 # seconds. Conversely, memory usage of build/gyp_chromium with Psyco |
49 # maxes out at about 158 MB vs. 132 MB without it. | 49 # maxes out at about 158 MB vs. 132 MB without it. |
50 # | 50 # |
51 # Psyco uses native libraries, so we need to load a different | 51 # Psyco uses native libraries, so we need to load a different |
52 # installation depending on which OS we are running under. It has not | 52 # installation depending on which OS we are running under. It has not |
53 # been tested whether using Psyco on our Mac and Linux builds is worth | 53 # been tested whether using Psyco on our Mac and Linux builds is worth |
54 # it (the GYP running time is a lot shorter, so the JIT startup cost | 54 # it (the GYP running time is a lot shorter, so the JIT startup cost |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 if not use_analyzer: | 324 if not use_analyzer: |
325 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() | 325 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() |
326 if vs2013_runtime_dll_dirs: | 326 if vs2013_runtime_dll_dirs: |
327 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs | 327 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs |
328 vs_toolchain.CopyVsRuntimeDlls( | 328 vs_toolchain.CopyVsRuntimeDlls( |
329 os.path.join(chrome_src, GetOutputDirectory()), | 329 os.path.join(chrome_src, GetOutputDirectory()), |
330 (x86_runtime, x64_runtime)) | 330 (x86_runtime, x64_runtime)) |
331 | 331 |
332 sys.exit(gyp_rc) | 332 sys.exit(gyp_rc) |
OLD | NEW |