Skip to content

Commit

Permalink
Merge pull request #274 from xen0n/loong64
Browse files Browse the repository at this point in the history
Add cross-build target linux/loong64
  • Loading branch information
estesp authored Nov 21, 2024
2 parents a834ffe + ad60092 commit 6a11d4e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
3 changes: 3 additions & 0 deletions hack/cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ PLATFORMS=(
# ARM; 32bit and 64bit
linux/arm/5 linux/arm/6 linux/arm/7 linux/arm64

# LoongArch
linux/loong64

# MIPS
linux/mips64le

Expand Down
7 changes: 7 additions & 0 deletions v2/pkg/util/osgen.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build ignore
// +build ignore

// This program generates oslist.go. It can be invoked by running
Expand All @@ -10,6 +11,7 @@ import (
"log"
"os"
"os/exec"
"sort"
"strings"
"text/template"
"time"
Expand Down Expand Up @@ -52,6 +54,11 @@ func main() {
i++
}

// Make the output deterministic because iteration order over Go map keys
// is random.
sort.Strings(oslist)
sort.Strings(archlist)

packageTemplate.Execute(f, struct {
Timestamp time.Time
OS []string
Expand Down
31 changes: 17 additions & 14 deletions v2/pkg/util/oslist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6a11d4e

Please sign in to comment.