diff options
author | Eric Anholt <[email protected]> | 2012-03-12 15:47:06 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-03-15 16:24:50 -0700 |
commit | 25c729bf9f373c6b590ef6647e560f33a954f38b (patch) | |
tree | cb59f76e7d6af24eeb3728bebdb7c9ea0cd63ea7 /src/glsl | |
parent | 497aab39f0dea48707f9414f318365839132ed75 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/glsl')
-rwxr-xr-x | src/glsl/builtins/tools/generate_builtins.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py index 72d12bb2a9a..9ab6edd226f 100755 --- a/src/glsl/builtins/tools/generate_builtins.py +++ b/src/glsl/builtins/tools/generate_builtins.py @@ -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) |