aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-22 13:41:46 +0900
committerOphestra <cat@gensokyo.uk>2026-05-22 13:42:02 +0900
commit9e363cb2c9cc51296624e39bcc266ccdf6f1c9de (patch)
tree9dbaba620df2f2f59a013170c88314fb6d4c1166 /internal
parent1389c770225450213264ae7c89253d467c54b388 (diff)
internal/rosa/go: runtime dependencies for alterative path
The GCC toolchain is not dependency-free, so append them here. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/go.go16
1 files changed, 7 insertions, 9 deletions
diff --git a/internal/rosa/go.go b/internal/rosa/go.go
index bc11af9a..64559d64 100644
--- a/internal/rosa/go.go
+++ b/internal/rosa/go.go
@@ -6,14 +6,12 @@ import (
"hakurei.app/internal/pkg"
)
-var _go = H("go")
-
// newGo returns a specific version of the Go toolchain.
func (t Toolchain) newGo(
version, checksum string,
env []string,
script string,
- boot pkg.Artifact,
+ boot ...pkg.Artifact,
) pkg.Artifact {
return t.NewPackage("go", version, newTar(
"https://go.dev/dl/go"+version+".src.tar.gz",
@@ -28,7 +26,7 @@ func (t Toolchain) newGo(
"TMPDIR=/dev/shm/go",
}, env),
- Extra: []pkg.Artifact{boot},
+ Extra: boot,
}, &GenericHelper{
InPlace: true,
Build: `
@@ -72,13 +70,13 @@ func init() {
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
var (
bootstrapEnv []string
- bootstrapEarly pkg.Artifact
+ bootstrapEarly []pkg.Artifact
finalEnv []string
)
switch t.arch {
case "amd64":
- bootstrapEarly = t.NewPackage("go", "1.4-bootstrap", newTar(
+ bootstrapEarly = []pkg.Artifact{t.NewPackage("go", "1.4-bootstrap", newTar(
"https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz",
"8o9JL_ToiQKadCTb04nvBDkp8O1xiWOolAxVEqaTGodieNe4lOFEjlOxN3bwwe23",
pkg.TarGzip,
@@ -98,11 +96,11 @@ mkdir -p /var/tmp/
`,
},
_bash,
- )
+ )}
case "arm64", "riscv64":
bootstrapEnv = append(bootstrapEnv, "GOROOT_BOOTSTRAP=/system")
- _, bootstrapEarly = t.MustLoad(H("gcc"))
+ bootstrapEarly = t.Append(bootstrapEarly, H("gcc"))
finalEnv = append(finalEnv, "CGO_ENABLED=0")
default:
@@ -123,7 +121,7 @@ sed -i \
echo \
'type syscallDescriptor = int' >> \
os/rawconn_test.go
-`, bootstrapEarly)
+`, bootstrapEarly...)
go121 := t.newGo(
"1.21.13",