translate-c tests: print clang compile errors on nonzero exit code

master
Andrew Kelley 2020-01-02 11:12:21 -05:00
parent 3dd067fa2b
commit 7bd80f2071
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 1 additions and 1 deletions

View File

@ -1512,7 +1512,7 @@ pub const TranslateCContext = struct {
switch (term) {
.Exited => |code| {
if (code != 0) {
warn("Compilation failed with exit code {}\n", .{code});
warn("Compilation failed with exit code {}\n{}\n", .{ code, stderr_buf.toSliceConst() });
printInvocation(zig_args.toSliceConst());
return error.TestFailed;
}