diff options
Diffstat (limited to 'go')
| -rw-r--r-- | go/build.zig | 5 | ||||
| -rw-r--r-- | go/build.zig.zon | 3 | ||||
| -rw-r--r-- | go/typdown.go | 2 |
3 files changed, 6 insertions, 4 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); } diff --git a/go/build.zig.zon b/go/build.zig.zon index b9c4c83..2117cf0 100644 --- a/go/build.zig.zon +++ b/go/build.zig.zon @@ -3,8 +3,7 @@ .version = "0.0.1", .dependencies = .{ .typdown = .{ - .url = "../", - .hash = "typdown-0.0.0-W_41P72ZAADdFceFUk8ED63kaCObehOJxT9HpRTabF_k", + .path = "../", }, }, .minimum_zig_version = "0.15.2", diff --git a/go/typdown.go b/go/typdown.go index 8d8fff7..1125ecb 100644 --- a/go/typdown.go +++ b/go/typdown.go @@ -1,6 +1,6 @@ package typdown -// #cgo LDFLAGS: -L${SRCDIR}/zig-out/lib/ -ltypdown +// #cgo LDFLAGS: -L${SRCDIR}/zig-out/lib -ltypdown // #include <stdlib.h> // #include "typdown.h" import "C" |
