diff options
| author | William Deegan <bill@baddogconsulting.com> | 2013-10-28 02:04:46 (GMT) |
|---|---|---|
| committer | William Deegan <bill@baddogconsulting.com> | 2013-10-28 02:04:46 (GMT) |
| commit | e38f59cab5d40f09f15c5e65645aa2d8af165c66 (patch) | |
| tree | d50c9d77698c3a82fcc4b64a5ff61b79c20a76f2 /src/engine/SCons/Script | |
| parent | e7888b15628b09af093621825b78df5cbcead088 (diff) | |
| parent | 2be0f31b80087974b5e6d53e12542637636a2253 (diff) | |
| download | SCons-e38f59cab5d40f09f15c5e65645aa2d8af165c66.zip SCons-e38f59cab5d40f09f15c5e65645aa2d8af165c66.tar.gz SCons-e38f59cab5d40f09f15c5e65645aa2d8af165c66.tar.bz2 | |
Merged in dirkbaechle/scons (pull request #92)
Fix: now counting instances only when requested via --debug=count (#2922)
Diffstat (limited to 'src/engine/SCons/Script')
| -rw-r--r-- | src/engine/SCons/Script/Main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 837c103..9083b8e 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -622,7 +622,7 @@ def _set_debug_values(options): debug_values = options.debug if "count" in debug_values: - # All of the object counts are within "if __debug__:" blocks, + # All of the object counts are within "if track_instances:" blocks, # which get stripped when running optimized (with python -O or # from compiled *.pyo files). Provide a warning if __debug__ is # stripped, so it doesn't just look like --debug=count is broken. @@ -630,6 +630,7 @@ def _set_debug_values(options): if __debug__: enable_count = True if enable_count: count_stats.enable(sys.stdout) + SCons.Debug.track_instances = True else: msg = "--debug=count is not supported when running SCons\n" + \ "\twith the python -O option or optimized (.pyo) modules." @@ -644,6 +645,8 @@ def _set_debug_values(options): if "memory" in debug_values: memory_stats.enable(sys.stdout) print_objects = ("objects" in debug_values) + if print_objects: + SCons.Debug.track_instances = True if "presub" in debug_values: SCons.Action.print_actions_presub = 1 if "stacktrace" in debug_values: |
