| 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, 'remoting', 'tools', 'build')) | 28 sys.path.insert(1, os.path.join(chrome_src, 'remoting', 'tools', 'build')) |
| 29 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', | 29 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', |
| 30 'Source', 'build', 'scripts')) | 30 'Source', 'build', 'scripts')) |
| 31 # FIXME schenney: Remove this once we remove Source/core/scripts | |
| 32 sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', | |
| 33 'Source', 'core', 'scripts')) | |
| 34 | |
| 35 | 31 |
| 36 # On Windows, Psyco shortens warm runs of build/gyp_chromium by about | 32 # On Windows, Psyco shortens warm runs of build/gyp_chromium by about |
| 37 # 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 | 33 # 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70 |
| 38 # seconds. Conversely, memory usage of build/gyp_chromium with Psyco | 34 # seconds. Conversely, memory usage of build/gyp_chromium with Psyco |
| 39 # maxes out at about 158 MB vs. 132 MB without it. | 35 # maxes out at about 158 MB vs. 132 MB without it. |
| 40 # | 36 # |
| 41 # Psyco uses native libraries, so we need to load a different | 37 # Psyco uses native libraries, so we need to load a different |
| 42 # installation depending on which OS we are running under. It has not | 38 # installation depending on which OS we are running under. It has not |
| 43 # been tested whether using Psyco on our Mac and Linux builds is worth | 39 # been tested whether using Psyco on our Mac and Linux builds is worth |
| 44 # it (the GYP running time is a lot shorter, so the JIT startup cost | 40 # it (the GYP running time is a lot shorter, so the JIT startup cost |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 # to enfore syntax checking. | 144 # to enfore syntax checking. |
| 149 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 145 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
| 150 if syntax_check and int(syntax_check): | 146 if syntax_check and int(syntax_check): |
| 151 args.append('--check') | 147 args.append('--check') |
| 152 | 148 |
| 153 print 'Updating projects from gyp files...' | 149 print 'Updating projects from gyp files...' |
| 154 sys.stdout.flush() | 150 sys.stdout.flush() |
| 155 | 151 |
| 156 # Off we go... | 152 # Off we go... |
| 157 sys.exit(gyp.main(args)) | 153 sys.exit(gyp.main(args)) |
| OLD | NEW |