test: test for issues starting codegen on many targets

Specifically this is to make sure llvm data layout generation doesn't
regress.  The no emit bin is to allow testing targets that can't
currently be linked.  The commented out targets are ones that fail in
the linker anyway when no emit bin is passed.
This commit is contained in:
Jacob Young
2023-07-23 23:45:31 -04:00
parent 06af9cc101
commit c610cde1eb
7 changed files with 144 additions and 6 deletions

View File

@@ -294,7 +294,7 @@ pub fn evalZigProcess(
s: *Step,
argv: []const []const u8,
prog_node: *std.Progress.Node,
) ![]const u8 {
) !?[]const u8 {
assert(argv.len != 0);
const b = s.owner;
const arena = b.allocator;
@@ -423,6 +423,8 @@ pub fn evalZigProcess(
});
}
if (s.cast(Compile)) |compile| if (compile.emit_bin == .no_emit) return result;
return result orelse return s.fail(
"the following command failed to communicate the compilation result:\n{s}",
.{try allocPrintCmd(arena, null, argv)},