internal/rosa/go: runtime dependencies for alterative path
All checks were successful
Test / Create distribution (push) Successful in 1m7s
Test / Sandbox (push) Successful in 2m57s
Test / ShareFS (push) Successful in 4m15s
Test / Hakurei (push) Successful in 4m26s
Test / Sandbox (race detector) (push) Successful in 5m46s
Test / Hakurei (race detector) (push) Successful in 6m47s
Test / Flake checks (push) Successful in 1m25s
All checks were successful
Test / Create distribution (push) Successful in 1m7s
Test / Sandbox (push) Successful in 2m57s
Test / ShareFS (push) Successful in 4m15s
Test / Hakurei (push) Successful in 4m26s
Test / Sandbox (race detector) (push) Successful in 5m46s
Test / Hakurei (race detector) (push) Successful in 6m47s
Test / Flake checks (push) Successful in 1m25s
The GCC toolchain is not dependency-free, so append them here. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -6,14 +6,12 @@ import (
|
|||||||
"hakurei.app/internal/pkg"
|
"hakurei.app/internal/pkg"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _go = H("go")
|
|
||||||
|
|
||||||
// newGo returns a specific version of the Go toolchain.
|
// newGo returns a specific version of the Go toolchain.
|
||||||
func (t Toolchain) newGo(
|
func (t Toolchain) newGo(
|
||||||
version, checksum string,
|
version, checksum string,
|
||||||
env []string,
|
env []string,
|
||||||
script string,
|
script string,
|
||||||
boot pkg.Artifact,
|
boot ...pkg.Artifact,
|
||||||
) pkg.Artifact {
|
) pkg.Artifact {
|
||||||
return t.NewPackage("go", version, newTar(
|
return t.NewPackage("go", version, newTar(
|
||||||
"https://go.dev/dl/go"+version+".src.tar.gz",
|
"https://go.dev/dl/go"+version+".src.tar.gz",
|
||||||
@@ -28,7 +26,7 @@ func (t Toolchain) newGo(
|
|||||||
"TMPDIR=/dev/shm/go",
|
"TMPDIR=/dev/shm/go",
|
||||||
}, env),
|
}, env),
|
||||||
|
|
||||||
Extra: []pkg.Artifact{boot},
|
Extra: boot,
|
||||||
}, &GenericHelper{
|
}, &GenericHelper{
|
||||||
InPlace: true,
|
InPlace: true,
|
||||||
Build: `
|
Build: `
|
||||||
@@ -72,13 +70,13 @@ func init() {
|
|||||||
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||||
var (
|
var (
|
||||||
bootstrapEnv []string
|
bootstrapEnv []string
|
||||||
bootstrapEarly pkg.Artifact
|
bootstrapEarly []pkg.Artifact
|
||||||
|
|
||||||
finalEnv []string
|
finalEnv []string
|
||||||
)
|
)
|
||||||
switch t.arch {
|
switch t.arch {
|
||||||
case "amd64":
|
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",
|
"https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz",
|
||||||
"8o9JL_ToiQKadCTb04nvBDkp8O1xiWOolAxVEqaTGodieNe4lOFEjlOxN3bwwe23",
|
"8o9JL_ToiQKadCTb04nvBDkp8O1xiWOolAxVEqaTGodieNe4lOFEjlOxN3bwwe23",
|
||||||
pkg.TarGzip,
|
pkg.TarGzip,
|
||||||
@@ -98,11 +96,11 @@ mkdir -p /var/tmp/
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
_bash,
|
_bash,
|
||||||
)
|
)}
|
||||||
|
|
||||||
case "arm64", "riscv64":
|
case "arm64", "riscv64":
|
||||||
bootstrapEnv = append(bootstrapEnv, "GOROOT_BOOTSTRAP=/system")
|
bootstrapEnv = append(bootstrapEnv, "GOROOT_BOOTSTRAP=/system")
|
||||||
_, bootstrapEarly = t.MustLoad(H("gcc"))
|
bootstrapEarly = t.Append(bootstrapEarly, H("gcc"))
|
||||||
finalEnv = append(finalEnv, "CGO_ENABLED=0")
|
finalEnv = append(finalEnv, "CGO_ENABLED=0")
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -123,7 +121,7 @@ sed -i \
|
|||||||
echo \
|
echo \
|
||||||
'type syscallDescriptor = int' >> \
|
'type syscallDescriptor = int' >> \
|
||||||
os/rawconn_test.go
|
os/rawconn_test.go
|
||||||
`, bootstrapEarly)
|
`, bootstrapEarly...)
|
||||||
|
|
||||||
go121 := t.newGo(
|
go121 := t.newGo(
|
||||||
"1.21.13",
|
"1.21.13",
|
||||||
|
|||||||
Reference in New Issue
Block a user