Fix #1059: Linking for mingw/x86_64 on MSYS2 fails, and optimize "ar" command execution
Command line length=8158 is the maximum to be OK.
parent
fb06503307
commit
64a818cfd9
|
@ -12,8 +12,7 @@ def configure(env):
|
||||||
|
|
||||||
def mySubProcess(cmdline, env):
|
def mySubProcess(cmdline, env):
|
||||||
# print(cmdline)
|
# print(cmdline)
|
||||||
proc = subprocess.run(args=cmdline, shell=True, env=env)
|
rv = subprocess.run(args=cmdline, shell=True, env=env).returncode
|
||||||
rv = proc.returncode
|
|
||||||
if rv:
|
if rv:
|
||||||
print("=====")
|
print("=====")
|
||||||
print("subprocess.run().returncode=", rv, "(", hex(rv), ")")
|
print("subprocess.run().returncode=", rv, "(", hex(rv), ")")
|
||||||
|
@ -30,7 +29,7 @@ def configure(env):
|
||||||
length = lead + 1 + len(args[begin])
|
length = lead + 1 + len(args[begin])
|
||||||
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 > 8153:
|
if length > 8158:
|
||||||
cmdline = " ".join(args[0:3] + args[begin:i])
|
cmdline = " ".join(args[0:3] + args[begin:i])
|
||||||
# print("objs=", i - begin, ", length=", len(cmdline))
|
# print("objs=", i - begin, ", length=", len(cmdline))
|
||||||
rv = mySubProcess(cmdline, env)
|
rv = mySubProcess(cmdline, env)
|
||||||
|
|
Loading…
Reference in New Issue