Fix #1059: Linking for mingw/x86_64 on MSYS2 fails, w/ ar execution speed up
parent
88e135d53b
commit
189f56c34e
|
@ -22,12 +22,12 @@ def configure(env):
|
||||||
return rv
|
return rv
|
||||||
|
|
||||||
def mySpawn(sh, escape, cmd, args, env):
|
def mySpawn(sh, escape, cmd, args, env):
|
||||||
if len(args) > 3 and cmd.endswith("ar"):
|
rv = 0
|
||||||
|
if len(args) > 4 and cmd.endswith("ar"):
|
||||||
# print("Long ar command is split.\nargc=", len(args))
|
# print("Long ar command is split.\nargc=", len(args))
|
||||||
lead = len(" ".join(args[0:3]))
|
lead = len(" ".join(args[0:3]))
|
||||||
begin = 3
|
begin = 3
|
||||||
length = lead + 1 + len(args[begin])
|
length = lead + 1 + len(args[begin])
|
||||||
rv = 0
|
|
||||||
for i in range(4, len(args)):
|
for i in range(4, len(args)):
|
||||||
length += 1 + len(args[i])
|
length += 1 + len(args[i])
|
||||||
if length >= 8 * 1024 - 32:
|
if length >= 8 * 1024 - 32:
|
||||||
|
@ -37,7 +37,7 @@ def configure(env):
|
||||||
if rv:
|
if rv:
|
||||||
break
|
break
|
||||||
begin = i
|
begin = i
|
||||||
length = lead + 1 + len(args[i])
|
length = lead + 1 + len(args[begin])
|
||||||
if not rv:
|
if not rv:
|
||||||
cmdline = " ".join(args[0:3] + args[begin:])
|
cmdline = " ".join(args[0:3] + args[begin:])
|
||||||
# print("objs=", len(args) - begin, ", length=", len(cmdline))
|
# print("objs=", len(args) - begin, ", length=", len(cmdline))
|
||||||
|
|
Loading…
Reference in New Issue