mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
add standalone test for only dependending on the emitted assembly and not the bin
This commit is contained in:
parent
b4343074d2
commit
294ca6563e
@ -59,6 +59,9 @@
|
||||
//.issue_12588 = .{
|
||||
// .path = "issue_12588",
|
||||
//},
|
||||
.emit_asm_no_bin = .{
|
||||
.path = "emit_asm_no_bin",
|
||||
},
|
||||
.child_process = .{
|
||||
.path = "child_process",
|
||||
},
|
||||
|
19
test/standalone/emit_asm_no_bin/build.zig
Normal file
19
test/standalone/emit_asm_no_bin/build.zig
Normal file
@ -0,0 +1,19 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const test_step = b.step("test", "Test it");
|
||||
b.default_step = test_step;
|
||||
|
||||
const optimize: std.builtin.OptimizeMode = .Debug;
|
||||
|
||||
const obj = b.addObject(.{
|
||||
.name = "main",
|
||||
.root_source_file = b.path("main.zig"),
|
||||
.optimize = optimize,
|
||||
.target = b.graph.host,
|
||||
});
|
||||
_ = obj.getEmittedAsm();
|
||||
b.default_step.dependOn(&obj.step);
|
||||
|
||||
test_step.dependOn(&obj.step);
|
||||
}
|
1
test/standalone/emit_asm_no_bin/main.zig
Normal file
1
test/standalone/emit_asm_no_bin/main.zig
Normal file
@ -0,0 +1 @@
|
||||
pub fn main() void {}
|
Loading…
Reference in New Issue
Block a user