feat: add static linking for Linux builds using musl

Enable static linking for Linux binaries by installing musl-tools and passing appropriate LDFLAGS during build. This ensures portable, self-contained executables for Linux targets.
This commit is contained in:
Eric Coissac
2026-03-13 14:26:17 +01:00
parent 30ec8b1b63
commit 74e6fcaf83
2 changed files with 14 additions and 2 deletions

View File

@@ -10,8 +10,9 @@ BLUE := \033[0;34m
NC := \033[0m
GOFLAGS=
LDFLAGS=
GOCMD=go
GOBUILD=$(GOCMD) build $(GOFLAGS)
GOBUILD=$(GOCMD) build $(GOFLAGS) $(if $(LDFLAGS),-ldflags='$(LDFLAGS)')
GOGENERATE=$(GOCMD) generate
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test