diff options
Diffstat (limited to 'build.rs')
| -rw-r--r-- | build.rs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/build.rs b/build.rs index dde9a94..b4ffa72 100644 --- a/build.rs +++ b/build.rs @@ -31,15 +31,18 @@ fn process_all () -> std::io::Result<()> { .join(format!("{}.spv", input_path.file_name().unwrap().to_str().unwrap())); - if !Command::new("glslang") - .arg("-V") - .arg(&input_path) - .arg("-o") - .arg(output_path) - .status()?.success() - { - println!("cargo::error=Failed to compile shader {}", + let result = Command::new("glslang") + .arg("-V") + .arg(&input_path) + .arg("-o") + .arg(output_path) + .output()?; + if !result.status.success() { + println!("cargo::error=Failed to compile shader {}; details follow.", input_path.display()); + for line in std::str::from_utf8(&result.stdout).unwrap().lines() { + println!("cargo::error={}", line); + } } println!("cargo::rerun-if-changed={}", input_path.display()); |