mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-22 06:45:13 +00:00
spirv-builder: pass through non-JSON stdout lines even after an error. (#267)
This commit is contained in:
parent
0581f8580e
commit
6e0e23c620
@ -162,9 +162,14 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
|
||||
.env("RUSTFLAGS", rustflags)
|
||||
.output()
|
||||
.expect("failed to execute cargo build");
|
||||
|
||||
// `get_last_artifact` has the side-effect of printing invalid lines, so
|
||||
// we do that even in case of an error, to let through any useful messages
|
||||
// that ended up on stdout instead of stderr.
|
||||
let stdout = String::from_utf8(build.stdout).unwrap();
|
||||
let artifact = get_last_artifact(&stdout);
|
||||
|
||||
if build.status.success() {
|
||||
let stdout = String::from_utf8(build.stdout).unwrap();
|
||||
let artifact = get_last_artifact(&stdout);
|
||||
if builder.print_metadata {
|
||||
print_deps_of(&artifact);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user