diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-07-12 14:04:54 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-07-12 14:04:54 -0700 |
| commit | ec66f7419f2155d1b4bd852fdc3da87646d865c0 (patch) | |
| tree | 6d5ca764a7f6d1f624556644e1ee1be66d7e0024 | |
| parent | cbb5c9dd231104820f2bf2c4e1689b097f93f236 (diff) | |
print error messages from glslang
it's quite annoying otherwise, the build would fail with no explanation Force-Push: yes Change-Id: Ia5405c1f0e63f778da49ca1c85139f5e785fde29
| -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()); |