Skip to content

Instantly share code, notes, and snippets.

@joachimschmidt557
Created January 8, 2022 11:14
Show Gist options
  • Save joachimschmidt557/ae6e33aa4538990dd16880bc83e6b5c5 to your computer and use it in GitHub Desktop.
Save joachimschmidt557/ae6e33aa4538990dd16880bc83e6b5c5 to your computer and use it in GitHub Desktop.
Cross-compile timew-sync-server with zig cc
#!/usr/bin/env bash
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC=/home/joachim/src/timew-sync-server/zcc-x86_64-linux go build -o timew-sync-server-x86_64-linux
GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC=/home/joachim/src/timew-sync-server/zcc-aarch64-linux go build -o timew-sync-server-aarch64-linux
#!/usr/bin/env bash
exec zig cc -target aarch64-linux $@
#!/usr/bin/env bash
exec zig cc -target x86_64-linux $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment