diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-05-02 16:51:22 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-05-02 16:54:24 +0200 |
| commit | dce53de28a7089ef1525ebb576506ff731d47e00 (patch) | |
| tree | e7779d6132b08154c84dae57faeea8096dd4fa64 | |
| parent | 876ef71d1796fdac7f918762390324b8b7e6ff73 (diff) | |
build(go): move ldflags in build.zig and define typdown as system libbuild/cross-compile-go
| -rw-r--r-- | go/build.zig | 1 | ||||
| -rw-r--r-- | go/typdown.go | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/go/build.zig b/go/build.zig index 4babb18..41a9bbd 100644 --- a/go/build.zig +++ b/go/build.zig @@ -52,6 +52,7 @@ fn buildGo(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builti run.setEnvironmentVariable("CC", "zig cc"); run.setEnvironmentVariable("C++", "zig c++"); run.setEnvironmentVariable("CGO_ENABLED", "1"); + run.setEnvironmentVariable("CGO_LDFLAGS", "-L${SRCDIR}/zig-out/lib -ltypdown"); run.setEnvironmentVariable("GOOS", @tagName(target.result.os.tag)); return run; } diff --git a/go/typdown.go b/go/typdown.go index d93d4ca..a488430 100644 --- a/go/typdown.go +++ b/go/typdown.go @@ -1,8 +1,7 @@ package typdown -// #cgo LDFLAGS: -L${SRCDIR}/zig-out/lib -ltypdown // #include <stdlib.h> -// #include "typdown.h" +// #include <typdown.h> import "C" import ( "errors" |
