Fix #1059: Linking for mingw/x86_64 on MSYS2 fails

Feiyun Wang 2023-03-31 20:57:17 +08:00
parent 9d1c396c54
commit 61c3f8a440
1 changed files with 6 additions and 13 deletions

View File

@ -11,23 +11,16 @@ def configure(env):
import subprocess
def mySubProcess(cmdline, env):
# print "SPAWNED : " + cmdline
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
proc = subprocess.Popen(
cmdline,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
startupinfo=startupinfo,
shell=False,
# print("SPAWNED: " + cmdline)
proc = subprocess.run(
args=cmdline,
shell=True,
env=env,
)
data, err = proc.communicate()
rv = proc.wait()
rv = proc.returncode
if rv:
print("=====")
print(err.decode("utf-8"))
print(rv, "(", hex(rv), ")")
print("=====")
return rv