-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(make): build ooniprobe for windows and linux
In ooni/probe#1466, a user is asking about arm64 builds for Debian. We already had some code for that in #311. Let us adapt the code to the `./make` script to have arm64 builds.
- Loading branch information
1 parent
a9b3a3b
commit ae16246
Showing
2 changed files
with
170 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
set -e | ||
if [ "$GOARCH" = "" ]; then | ||
echo 'fatal: $GOARCH is not set' 1>&2 | ||
exit 1 | ||
fi | ||
set -x | ||
apk update | ||
apk upgrade | ||
apk add --no-progress gcc git linux-headers musl-dev | ||
CGO_ENABLED=1 GOOS=linux go build -o ./CLI/linux/$GOARCH/ \ | ||
-ldflags='-s -w -extldflags "-static"' "$@" ./cmd/ooniprobe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters