diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-26 05:24:11 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-26 05:24:11 +0900 |
| commit | 2bf98ebff08d42ec01e46d553a3231b1f18b6b29 (patch) | |
| tree | 344a8bab1cfde18496f36f43b1eea0de34304539 | |
| parent | 11eebd67df4c93bcbd77e45928a9c0738c0e459b (diff) | |
cmd/dist: enable ppc64le cross-compilation
The ppc64le target is currently cross-only due to the lack of test
constants. A future change may downgrade riscv64 to the same status.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | cmd/dist/main.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/dist/main.go b/cmd/dist/main.go index df586bbf..b147ade5 100644 --- a/cmd/dist/main.go +++ b/cmd/dist/main.go @@ -47,15 +47,17 @@ func mustRun(ctx context.Context, env []string, name string, arg ...string) { } } -// mustLinuxArch returns the architecture name used by linux corresponding to arch. -func mustLinuxArch(arch string) string { +// mustLLVMArch returns the LLVM target-triple-specific name corresponding to arch. +func mustLLVMArch(arch string) string { switch arch { case "amd64": return "x86_64" case "arm64": return "aarch64" + case "ppc64le": + return "powerpc64le" case "riscv64": - return "riscv64" + return arch default: log.Fatalf("unsupported target %s", arch) @@ -81,8 +83,8 @@ func main() { prefix := getenv("PREFIX", "/usr/local") destdir := getenv("DESTDIR", "dist") - linuxArch := mustLinuxArch(arch) - target := linuxArch + "-rosa-linux-musl" + llvmArch := mustLLVMArch(arch) + target := llvmArch + "-rosa-linux-musl" if verbose { log.Println() |
