We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0581f85 commit 6e0e23cCopy full SHA for 6e0e23c
crates/spirv-builder/src/lib.rs
@@ -162,9 +162,14 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
162
.env("RUSTFLAGS", rustflags)
163
.output()
164
.expect("failed to execute cargo build");
165
+
166
+ // `get_last_artifact` has the side-effect of printing invalid lines, so
167
+ // we do that even in case of an error, to let through any useful messages
168
+ // that ended up on stdout instead of stderr.
169
+ let stdout = String::from_utf8(build.stdout).unwrap();
170
+ let artifact = get_last_artifact(&stdout);
171
172
if build.status.success() {
- let stdout = String::from_utf8(build.stdout).unwrap();
- let artifact = get_last_artifact(&stdout);
173
if builder.print_metadata {
174
print_deps_of(&artifact);
175
}
0 commit comments