authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2024-08-18 15:05:52+02:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2024-08-19 19:09:13+02:00
log80999391d9b0db0303f59942cb52542a6e4da331
treed49aa7403bfc380281c49a626c894eb5c8b5ebc2
parent294ca6563ea5efeec3ab30f27a06c05c2a657f80
signaturebadge-check Signed by SSH key SHA256:ZS52FNyUv2WUXvO4njmVaFVO46RHojFuOrxRc4LuKzg

re-enable emit_asm_and_bin and emit_llvm_no_bin tests

These were fixed during the last few commits too. The emit_llvm_no_bin test is renamed from the issue_12588 test. Closes #17484

5 files changed, 33 insertions(+), 35 deletions(-)

test/standalone/build.zig.zon+7-9
......@@ -51,16 +51,14 @@
5151 .install_raw_hex = .{
5252 .path = "install_raw_hex",
5353 },
54 // https://github.com/ziglang/zig/issues/17484
55 //.emit_asm_and_bin = .{
56 // .path = "emit_asm_and_bin",
57 //},
58 // https://github.com/ziglang/zig/issues/17484
59 //.issue_12588 = .{
60 // .path = "issue_12588",
61 //},
54 .emit_asm_and_bin = .{
55 .path = "emit_asm_and_bin",
56 },
57 .emit_llvm_no_bin = .{
58 .path = "emit_llvm_no_bin",
59 },
6260 .emit_asm_no_bin = .{
63 .path = "emit_asm_no_bin",
61 .path = "emit_asm_no_bin",
6462 },
6563 .child_process = .{
6664 .path = "child_process",
test/standalone/emit_llvm_no_bin/build.zig created+20
......@@ -0,0 +1,20 @@
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.getEmittedLlvmIr();
16 _ = obj.getEmittedLlvmBc();
17 b.default_step.dependOn(&obj.step);
18
19 test_step.dependOn(&obj.step);
20}
test/standalone/emit_llvm_no_bin/main.zig created+6
......@@ -0,0 +1,6 @@
1const std = @import("std");
2
3export fn strFromFloatHelp(float: f64) void {
4 var buf: [400]u8 = undefined;
5 _ = std.fmt.bufPrint(&buf, "{d}", .{float}) catch unreachable;
6}
test/standalone/issue_12588/build.zig deleted-20
......@@ -1,20 +0,0 @@
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.getEmittedLlvmIr();
16 _ = obj.getEmittedLlvmBc();
17 b.default_step.dependOn(&obj.step);
18
19 test_step.dependOn(&obj.step);
20}
test/standalone/issue_12588/main.zig deleted-6
......@@ -1,6 +0,0 @@
1const std = @import("std");
2
3export fn strFromFloatHelp(float: f64) void {
4 var buf: [400]u8 = undefined;
5 _ = std.fmt.bufPrint(&buf, "{d}", .{float}) catch unreachable;
6}