authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2024-08-18 15:02:24+02:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2024-08-19 19:09:13+02:00
log294ca6563ea5efeec3ab30f27a06c05c2a657f80
tree22c05ff390958e5e218d4a55e8444f7d54ceb37d
parentb4343074d2d6ee81f8e589395a9c045031b86b83
signaturebadge-check Signed by SSH key SHA256:ZS52FNyUv2WUXvO4njmVaFVO46RHojFuOrxRc4LuKzg

add standalone test for only dependending on the emitted assembly and not the bin


3 files changed, 23 insertions(+), 0 deletions(-)

test/standalone/build.zig.zon+3
......@@ -59,6 +59,9 @@
5959 //.issue_12588 = .{
6060 // .path = "issue_12588",
6161 //},
62 .emit_asm_no_bin = .{
63 .path = "emit_asm_no_bin",
64 },
6265 .child_process = .{
6366 .path = "child_process",
6467 },
test/standalone/emit_asm_no_bin/build.zig created+19
......@@ -0,0 +1,19 @@
1const std = @import("std");
2
3pub fn build(b: *std.Build) void {
4 const test_step = b.step("test", "Test it");
5 b.default_step = test_step;
6
7 const optimize: std.builtin.OptimizeMode = .Debug;
8
9 const obj = b.addObject(.{
10 .name = "main",
11 .root_source_file = b.path("main.zig"),
12 .optimize = optimize,
13 .target = b.graph.host,
14 });
15 _ = obj.getEmittedAsm();
16 b.default_step.dependOn(&obj.step);
17
18 test_step.dependOn(&obj.step);
19}
test/standalone/emit_asm_no_bin/main.zig created+1
......@@ -0,0 +1 @@
1pub fn main() void {}