mirror of
https://github.com/servo/servo.git
synced 2025-06-28 11:03:39 +01:00
Auto merge of #26198 - Manishearth:vcvarsall-fail, r=jdm
Report error when vcvarsall fails In trying to get my Windows cross build working on my desktop, I ended up spending a lot of time trying to replicate a failure within servo's build system that ultimately turned out to be vcvarsall silently failing (I was missing a trailing slash in my `VSINSTALLDIR` env var, which vcvarsall does not handle well at all) We should report an error when this happens. r? @jdm
This commit is contained in:
commit
7d3617a0d4
1 changed files with 5 additions and 1 deletions
|
@ -315,11 +315,15 @@ class MachCommands(CommandBase):
|
|||
process = subprocess.Popen('("%s" %s > nul) && "python" -c "import os; print(repr(os.environ))"' %
|
||||
(os.path.join(vs_dirs['vcdir'], "Auxiliary", "Build", "vcvarsall.bat"), "x64"),
|
||||
stdout=subprocess.PIPE, shell=True)
|
||||
stdout, _ = process.communicate()
|
||||
stdout, stderr = process.communicate()
|
||||
exitcode = process.wait()
|
||||
encoding = locale.getpreferredencoding() # See https://stackoverflow.com/a/9228117
|
||||
if exitcode == 0:
|
||||
os.environ.update(eval(stdout.decode(encoding)))
|
||||
else:
|
||||
print("Failed to run vcvarsall. stderr:")
|
||||
print(stderr.decode(encoding))
|
||||
exit(1)
|
||||
|
||||
# Ensure that GStreamer libraries are accessible when linking.
|
||||
if 'windows' in target_triple:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue