aboutsummaryrefslogtreecommitdiff
path: root/go/build.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-20 15:36:48 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-20 15:36:48 +0200
commit1fcdd6f58533cdc4b89cead6119179646a05178f (patch)
tree4a84f773eac6b760effda7d22ac2199390b83e1d /go/build.zig
parent4372b49024e82e889eb2073c37fbcc1dada05723 (diff)
build(go): not installing artificat for tests
Diffstat (limited to 'go/build.zig')
-rw-r--r--go/build.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/go/build.zig b/go/build.zig
index a448636..7cce475 100644
--- a/go/build.zig
+++ b/go/build.zig
@@ -13,6 +13,8 @@ pub fn build(b: *std.Build) !void {
.root_module = typdown,
.linkage = .static,
});
+ //lib.bundle_compiler_rt = true;
+ //lib.pie = true;
const install = b.addInstallArtifact(lib, .{});
// when emitting headers will be fixed
// currently, we have to use a symlink/copy to get it
@@ -29,6 +31,8 @@ pub fn build(b: *std.Build) !void {
});
b.getInstallStep().dependOn(&go_build.step);
+ const test_step = b.step("test", "Run tests");
+ test_step.dependOn(b.getInstallStep());
const race = b.option(bool, "race", "Run tests with -race") orelse false;
const go_test = b.addSystemCommand(&[_][]const u8{
"go", "test",
@@ -38,6 +42,5 @@ pub fn build(b: *std.Build) !void {
if (race) go_test.addArg("-race");
go_test.addArg("./...");
- const test_step = b.step("test", "Run tests");
test_step.dependOn(&go_test.step);
}