Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux arm64 support #104

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@ go.build.linux:
@ tar -czf release/bud_v$(BUD_VERSION)_linux_amd64.tar.gz -C release bud_v$(BUD_VERSION)_linux_amd64
@ rm -rf release/bud_v$(BUD_VERSION)_linux_amd64

go.build.linux.arm64:
@ xgo \
--targets=linux/arm64 \
--dest=release \
--out=bud \
--trimpath \
--ldflags="-s -w \
-X 'github.com/livebud/bud/internal/version.Bud=$(BUD_VERSION)' \
" \
./ 1> /dev/null
@ mkdir -p release/bud_v$(BUD_VERSION)_linux_arm64
@ mv release/bud-linux-arm64 release/bud_v$(BUD_VERSION)_linux_arm64/bud
@ cp {Changelog,License,Readme}.md release/bud_v$(BUD_VERSION)_linux_arm64
@ tar -czf release/bud_v$(BUD_VERSION)_linux_arm64.tar.gz -C release bud_v$(BUD_VERSION)_linux_arm64
@ rm -rf release/bud_v$(BUD_VERSION)_linux_arm64

# v8go on Windows isn't supported at the moment.
# You'll encounter: "/usr/bin/x86_64-w64-mingw32-ld: cannot find -lv8"
# See:
Expand Down Expand Up @@ -190,7 +206,8 @@ build:
@ $(MAKE) --no-print-directory -j4 \
go.build.darwin.amd64 \
go.build.darwin.arm64 \
go.build.linux
go.build.linux \
go.build.linux.arm64
@ go run scripts/generate-checksums/main.go

##
Expand Down
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ is_supported_platform() {
darwin/arm64) found=0 ;;
darwin/386) found=0 ;;
linux/amd64) found=0 ;;
linux/arm64) found=0 ;;
linux/386) found=0 ;;
windows/amd64) found=0 ;;
windows/386) found=0 ;;
Expand Down Expand Up @@ -339,4 +340,4 @@ if [ "$OS" = "windows" ]; then
BINARY="${BINARY}.exe"
fi

execute
execute