making SCons.Job.stack_size a variable that always exists, instead of
one that gets set from outside and requires SCons.Job to check for an
AttributeError.
git-svn-id: http://scons.tigris.org/svn/scons/trunk@3393
fdb21ef1-2011-0410-befe-
b5e4ea1792b1
import os
import signal
-import SCons
+import SCons.Errors
# The default stack size (in kilobytes) of the threads used to execute
# jobs in parallel.
# parallelized the build. For example, the default stack size on linux
# is 8 MBytes.
+explicit_stack_size = None
default_stack_size = 256
interrupt_msg = 'Build interrupted.'
self.job = None
if num > 1:
- try:
- stack_size = SCons.Job.stack_size
- except AttributeError:
+ stack_size = explicit_stack_size
+ if stack_size is None:
stack_size = default_stack_size
try:
except ImportError:
pass
-import SCons
-
class SConsInteractiveCmd(cmd.Cmd):
"""\
build [TARGETS] Build the specified TARGETS and their dependencies.
build [TARGETS] Build the specified TARGETS and their
dependencies. 'b' is a synonym.
"""
+ import SCons.Node
import SCons.SConsign
import SCons.Script.Main
SCons.Node.implicit_cache = options.implicit_cache
SCons.Node.FS.set_duplicate(options.duplicate)
fs.set_max_drift(options.max_drift)
- if not options.stack_size is None:
- SCons.Job.stack_size = options.stack_size
+
+ SCons.Job.explicit_stack_size = options.stack_size
platform = SCons.Platform.platform_module()