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 10 matching lines...) Expand all Loading... |
21 import gyp | 21 import gyp |
22 | 22 |
23 # Add paths so that pymod_do_main(...) can import files. | 23 # Add paths so that pymod_do_main(...) can import files. |
24 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) | 24 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) |
25 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) | 25 sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) |
26 sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) | 26 sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) |
27 sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) | 27 sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) |
28 sys.path.insert(1, os.path.join(chrome_src, 'native_client_sdk', 'src', | 28 sys.path.insert(1, os.path.join(chrome_src, 'native_client_sdk', 'src', |
29 'build_tools')) | 29 'build_tools')) |
30 sys.path.insert(1, os.path.join(chrome_src, 'remoting', 'tools', 'build')) | 30 sys.path.insert(1, os.path.join(chrome_src, 'remoting', 'tools', 'build')) |
31 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'liblouis')) | |
32 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', | 31 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', |
33 'Source', 'build', 'scripts')) | 32 'Source', 'build', 'scripts')) |
34 | 33 |
35 # On Windows, Psyco shortens warm runs of build/gyp_chromium by about | 34 # On Windows, Psyco shortens warm runs of build/gyp_chromium by about |
36 # 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 | 35 # 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 |
37 # seconds. Conversely, memory usage of build/gyp_chromium with Psyco | 36 # seconds. Conversely, memory usage of build/gyp_chromium with Psyco |
38 # maxes out at about 158 MB vs. 132 MB without it. | 37 # maxes out at about 158 MB vs. 132 MB without it. |
39 # | 38 # |
40 # Psyco uses native libraries, so we need to load a different | 39 # Psyco uses native libraries, so we need to load a different |
41 # installation depending on which OS we are running under. It has not | 40 # installation depending on which OS we are running under. It has not |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 # to enfore syntax checking. | 154 # to enfore syntax checking. |
156 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 155 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
157 if syntax_check and int(syntax_check): | 156 if syntax_check and int(syntax_check): |
158 args.append('--check') | 157 args.append('--check') |
159 | 158 |
160 print 'Updating projects from gyp files...' | 159 print 'Updating projects from gyp files...' |
161 sys.stdout.flush() | 160 sys.stdout.flush() |
162 | 161 |
163 # Off we go... | 162 # Off we go... |
164 sys.exit(gyp.main(args)) | 163 sys.exit(gyp.main(args)) |
OLD | NEW |