Add a WAF workaround for the 'Input line is too long.' error in win32/mingw.
This commit is contained in:
20
wscript
20
wscript
@@ -244,6 +244,22 @@ def add_scratch_programs(bld):
|
||||
obj.source = "scratch/%s" % filename
|
||||
obj.target = "scratch/%s" % name
|
||||
|
||||
|
||||
##
|
||||
## This replacement spawn function increases the maximum command line length to 32k
|
||||
##
|
||||
def _exec_command_interact_win32(s):
|
||||
if Params.g_verbose:
|
||||
print s
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
proc = subprocess.Popen(s, shell=False, startupinfo=startupinfo)
|
||||
stat = proc.wait()
|
||||
if stat & 0xff:
|
||||
return stat | 0x80
|
||||
return stat >> 8
|
||||
|
||||
|
||||
def build(bld):
|
||||
if Params.g_options.no_task_lines:
|
||||
import Runner
|
||||
@@ -251,6 +267,10 @@ def build(bld):
|
||||
pass
|
||||
Runner.printout = null_printout
|
||||
|
||||
if sys.platform == 'win32':
|
||||
import Runner
|
||||
Runner.exec_command = _exec_command_interact_win32
|
||||
|
||||
Params.g_cwd_launch = Params.g_build.m_curdirnode.abspath()
|
||||
bld.create_ns3_program = types.MethodType(create_ns3_program, bld)
|
||||
variant_name = bld.env_of_name('default')['NS3_ACTIVE_VARIANT']
|
||||
|
||||
Reference in New Issue
Block a user