| ... | @@ -1242,9 +1242,10 @@ fn testRelocatableZig(b: *Build, opts: Options) *Step { | ... | @@ -1242,9 +1242,10 @@ fn testRelocatableZig(b: *Build, opts: Options) *Step { |
| 1242 | if (opts.use_llvm) { | 1242 | if (opts.use_llvm) { |
| 1243 | // TODO: enable this once self-hosted can print panics and stack traces | 1243 | // TODO: enable this once self-hosted can print panics and stack traces |
| 1244 | run.addCheck(.{ .expect_stderr_match = b.dupe("panic: Oh no!") }); | 1244 | run.addCheck(.{ .expect_stderr_match = b.dupe("panic: Oh no!") }); |
| 1245 | run.addCheck(.{ .expect_term = .{ .Signal = std.os.darwin.SIG.ABRT } }); | 1245 | } |
| 1246 | } else { | 1246 | if (builtin.os.tag == .macos) { |
| 1247 | run.addCheck(.{ .expect_term = .{ .Signal = std.os.darwin.SIG.TRAP } }); | 1247 | const signal: u32 = if (opts.use_llvm) std.os.darwin.SIG.ABRT else std.os.darwin.SIG.TRAP; |
| | 1248 | run.addCheck(.{ .expect_term = .{ .Signal = signal } }); |
| 1248 | } | 1249 | } |
| 1249 | test_step.dependOn(&run.step); | 1250 | test_step.dependOn(&run.step); |
| 1250 | | 1251 | |
| ... | @@ -2318,6 +2319,7 @@ fn addTestStep(b: *Build, comptime prefix: []const u8, opts: Options) *Step { | ... | @@ -2318,6 +2319,7 @@ fn addTestStep(b: *Build, comptime prefix: []const u8, opts: Options) *Step { |
| 2318 | return link.addTestStep(b, "macho-" ++ prefix, opts); | 2319 | return link.addTestStep(b, "macho-" ++ prefix, opts); |
| 2319 | } | 2320 | } |
| 2320 | | 2321 | |
| | 2322 | const builtin = @import("builtin"); |
| 2321 | const addAsmSourceBytes = link.addAsmSourceBytes; | 2323 | const addAsmSourceBytes = link.addAsmSourceBytes; |
| 2322 | const addCSourceBytes = link.addCSourceBytes; | 2324 | const addCSourceBytes = link.addCSourceBytes; |
| 2323 | const addRunArtifact = link.addRunArtifact; | 2325 | const addRunArtifact = link.addRunArtifact; |