| OLD | NEW |
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 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 import os | 5 import os |
| 6 import shutil | 6 import shutil |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 | 9 |
| 10 if sys.platform == 'win32': | 10 if sys.platform == 'win32': |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 cpus = int(os.environ.get('NUMBER_OF_PROCESSORS', 1)) | 159 cpus = int(os.environ.get('NUMBER_OF_PROCESSORS', 1)) |
| 160 elif root_env['PLATFORM'] in ['linux', 'linux2', 'posix']: | 160 elif root_env['PLATFORM'] in ['linux', 'linux2', 'posix']: |
| 161 # TODO(evanm): this is Linux-specific, not posix. | 161 # TODO(evanm): this is Linux-specific, not posix. |
| 162 # Parse /proc/cpuinfo for processor count. | 162 # Parse /proc/cpuinfo for processor count. |
| 163 cpus = len([l for l in open('/proc/cpuinfo') if l.startswith('processor\t')]) | 163 cpus = len([l for l in open('/proc/cpuinfo') if l.startswith('processor\t')]) |
| 164 else: | 164 else: |
| 165 cpus = 1 | 165 cpus = 1 |
| 166 SetOption('num_jobs', cpus + 1) | 166 SetOption('num_jobs', cpus + 1) |
| 167 | 167 |
| 168 | 168 |
| 169 if ARGUMENTS.get('VERBOSE') in (None, '0'): | |
| 170 root_env['CCCOMSTR'] = 'Compiling $TARGET ...' | |
| 171 root_env['CXXCOMSTR'] = 'Compiling $TARGET ...' | |
| 172 root_env['SHCCCOMSTR'] = 'Compiling $TARGET ...' | |
| 173 root_env['SHCXXCOMSTR'] = 'Compiling $TARGET ...' | |
| 174 root_env['ARCOMSTR'] = 'Archiving $TARGET ...' | |
| 175 root_env['LINKCOMSTR'] = 'Linking $TARGET ...' | |
| 176 root_env['BINDINGSCOMSTR'] = 'Building bindings in $TARGET ...' | |
| 177 | |
| 178 # Use timestamps change, followed by MD5 for speed | 169 # Use timestamps change, followed by MD5 for speed |
| 179 root_env.Decider('MD5-timestamp') | 170 root_env.Decider('MD5-timestamp') |
| 180 | 171 |
| 181 # Incorporate settings that should apply globally (primarily to provide | 172 # Incorporate settings that should apply globally (primarily to provide |
| 182 # an obvious place for developmental experimentation). | 173 # an obvious place for developmental experimentation). |
| 183 root_env.ApplySConscript(['$CHROME_SRC_DIR/build/common.scons']) | 174 root_env.ApplySConscript(['$CHROME_SRC_DIR/build/common.scons']) |
| 184 | 175 |
| 185 # The list of all leaf (fully described) environments. | 176 # The list of all leaf (fully described) environments. |
| 186 environment_list = [] | 177 environment_list = [] |
| 187 components = [] | 178 components = [] |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 LOAD=[module,...] Comma-separated list of components to load in the | 632 LOAD=[module,...] Comma-separated list of components to load in the |
| 642 dependency graph ('-' prefix excludes): | 633 dependency graph ('-' prefix excludes): |
| 643 %s | 634 %s |
| 644 SYSTEM_LIBS=[lib,...] Comma-separated list of system libraries to link | 635 SYSTEM_LIBS=[lib,...] Comma-separated list of system libraries to link |
| 645 dynamically (by default they are built in from | 636 dynamically (by default they are built in from |
| 646 included sources): | 637 included sources): |
| 647 %s | 638 %s |
| 648 PROGRESS=type Display a progress indicator: | 639 PROGRESS=type Display a progress indicator: |
| 649 name: print each evaluated target name | 640 name: print each evaluated target name |
| 650 spinner: print a spinner every 5 targets | 641 spinner: print a spinner every 5 targets |
| 651 VERBOSE=1 Display full command lines | |
| 652 """ | 642 """ |
| 653 | 643 |
| 654 if GetOption('help'): | 644 if GetOption('help'): |
| 655 import textwrap | 645 import textwrap |
| 656 tw = textwrap.TextWrapper( | 646 tw = textwrap.TextWrapper( |
| 657 width = 78, | 647 width = 78, |
| 658 initial_indent = ' '*32, | 648 initial_indent = ' '*32, |
| 659 subsequent_indent = ' '*32, | 649 subsequent_indent = ' '*32, |
| 660 ) | 650 ) |
| 661 components = tw.fill(', '.join(components)) | 651 components = tw.fill(', '.join(components)) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 'all_libraries', | 718 'all_libraries', |
| 729 'all_languages', | 719 'all_languages', |
| 730 'all_programs', | 720 'all_programs', |
| 731 'all_test_programs', | 721 'all_test_programs', |
| 732 ], projects = [p], | 722 ], projects = [p], |
| 733 COMPONENT_VS_PROJECT_SCRIPT_PATH=( | 723 COMPONENT_VS_PROJECT_SCRIPT_PATH=( |
| 734 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'), | 724 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'), |
| 735 ) | 725 ) |
| 736 | 726 |
| 737 # ------------------------------------------------------------------------- | 727 # ------------------------------------------------------------------------- |
| OLD | NEW |