mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 02:00:12 +01:00
glsl: When failing to compile some builtins, print the error.
This makes the process slightly more debuggable, though it would be nice if the build just failed immediately instead. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
497aab39f0
commit
25c729bf9f
1 changed files with 8 additions and 0 deletions
|
|
@ -63,6 +63,14 @@ def run_compiler(args):
|
|||
p = Popen(command, 1, stdout=PIPE, shell=False)
|
||||
output = p.communicate()[0]
|
||||
|
||||
if (p.returncode):
|
||||
sys.stderr.write("Failed to compile builtins with command:\n")
|
||||
for arg in command:
|
||||
sys.stderr.write(arg + " ")
|
||||
sys.stderr.write("\n")
|
||||
sys.stderr.write("Result:\n")
|
||||
sys.stderr.write(output)
|
||||
|
||||
# Clean up output a bit by killing whitespace before a closing paren.
|
||||
kill_paren_whitespace = re.compile(r'[ \n]*\)', re.MULTILINE)
|
||||
output = kill_paren_whitespace.sub(')', output)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue