Skip to content

Commit

Permalink
feat: add support for linux aarch64 (#5516)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Egelund-Müller <[email protected]>
  • Loading branch information
Kavinjsir and begelundmuller authored Aug 27, 2024
1 parent 554ac6c commit 330207a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,25 @@ builds:
ldflags:
- -s -w -X main.Version={{.Version}} -X main.Commit={{.ShortCommit}} -X main.BuildDate={{.Date}}

- id: linux_aarch64
main: ./cli/main.go
binary: rill
goos:
- linux
goarch:
- arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS=--sysroot=/sysroot/linux/arm64
- CGO_LDFLAGS=--sysroot=/sysroot/linux/arm64
- PKG_CONFIG_SYSROOT_DIR=/sysroot/linux/arm64
- PKG_CONFIG_PATH=/sysroot/linux/arm64/usr/local/lib/pkgconfig
flags:
- "-mod=readonly"
ldflags:
- -s -w -X main.Version={{.Version}} -X main.Commit={{.ShortCommit}} -X main.BuildDate={{.Date}}

blobs:
- provider: gs
bucket: prod-cdn.rilldata.com
Expand Down
Empty file.
8 changes: 8 additions & 0 deletions runtime/drivers/duckdb/extensions/extensions_linux_arm64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build linux && arm64

package extensions

import "embed"

//go:embed embed/linux_arm64/*
var embeddedFiles embed.FS
2 changes: 1 addition & 1 deletion scripts/embed_duckdb_ext/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
var extensions = []string{"json", "icu", "parquet", "httpfs", "sqlite_scanner", "motherduck"}

// DuckDB platforms to download extensions for
var platforms = []string{"linux_amd64", "osx_amd64", "osx_arm64"}
var platforms = []string{"linux_amd64", "linux_arm64", "osx_amd64", "osx_arm64"}

// Embed directory to store the extensions
var embedDirRoot = "runtime/drivers/duckdb/extensions/embed/"
Expand Down
2 changes: 2 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ initPlatform() {
PLATFORM="darwin_amd64"
elif [ "$OS" = "linux" ] && [ "$ARCH" = "x86_64" ]; then
PLATFORM="linux_amd64"
elif [ "$OS" = "linux" ] && { [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; }; then
PLATFORM="linux_arm64"
else
printf "Platform not supported: os=%s arch=%s\n" "$OS" "$ARCH"
exit 1
Expand Down

0 comments on commit 330207a

Please sign in to comment.