internal/rosa/go: migrate to azalea
Test / Create distribution (push) Successful in 1m3s
Test / Sandbox (push) Successful in 3m9s
Test / Hakurei (push) Successful in 4m13s
Test / ShareFS (push) Successful in 4m13s
Test / Sandbox (race detector) (push) Successful in 5m41s
Test / Hakurei (race detector) (push) Successful in 6m50s
Test / Flake checks (push) Successful in 1m15s

Bootstrap still remains native, however the final toolchain is migrated to azalea.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-07-10 14:48:54 +09:00
parent fd0a81b304
commit 8e9b3a2ed1
2 changed files with 67 additions and 26 deletions
+8 -26
View File
@@ -56,16 +56,15 @@ ln -s \
func init() { func init() {
const ( const (
version = "1.26.4" version = "1.25.12"
checksum = "fpqJlxa41wKRtbnviYNLk9VxgcL-5oIEDxsriF8svU6kNwQW70oRRA9gTz_ImVoB" checksum = "XNrGD_boJl2-El_a_T3BuTcMin_WPoU-FGddcNG8dcXA8n2QuxZB7kaUaCWu60QX"
) )
meta := Metadata{ meta := Metadata{
Name: "go", Name: "go-bootstrap",
Description: "the Go programming language toolchain", Description: "the Go programming language toolchain (bootstrap)",
Website: "https://go.dev", Website: "https://go.dev",
Version: version, Version: version,
Exclude: true,
ID: 1227,
} }
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) { native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
var ( var (
@@ -152,8 +151,8 @@ sed -i \
) )
go125 := t.newGo( go125 := t.newGo(
"1.25.12", version,
"XNrGD_boJl2-El_a_T3BuTcMin_WPoU-FGddcNG8dcXA8n2QuxZB7kaUaCWu60QX", checksum,
[]string{"CGO_ENABLED=0"}, ` []string{"CGO_ENABLED=0"}, `
sed -i \ sed -i \
's,/lib/ld-musl-`+t.linuxArch()+`.so.1,/system/bin/linker,' \ 's,/lib/ld-musl-`+t.linuxArch()+`.so.1,/system/bin/linker,' \
@@ -165,23 +164,6 @@ rm \
`, go123, `, go123,
) )
return &meta, t.newGo( return &meta, go125
version,
checksum,
finalEnv, `
sed -i \
's,/lib/ld-musl-`+t.linuxArch()+`.so.1,/system/bin/linker,' \
cmd/link/internal/`+t.arch+`/obj.go
sed -i \
's/cpu.X86.HasAVX512VBMI/& \&\& cpu.X86.HasPOPCNT/' \
internal/runtime/gc/scan/scan_amd64.go
rm \
os/root_unix_test.go \
cmd/cgo/internal/testsanitizers/tsan_test.go \
cmd/cgo/internal/testsanitizers/cshared_test.go
`, go125,
)
}) })
} }
+59
View File
@@ -0,0 +1,59 @@
package go {
description = "the Go programming language toolchain";
website = "https://go.dev";
anitya = 1227;
version# = "1.26.4";
source = remoteTar {
url = "https://go.dev/dl/go"+version+".src.tar.gz";
checksum = "fpqJlxa41wKRtbnviYNLk9VxgcL-5oIEDxsriF8svU6kNwQW70oRRA9gTz_ImVoB";
compress = gzip;
};
env = [
"CC=cc",
"GOCACHE=/tmp/gocache",
"GOROOT_BOOTSTRAP=/system/go",
"TMPDIR=/dev/shm/go",
];
enterSource = true;
exec = generic {
inPlace = true;
build = `
mkdir /work/system/ "${TMPDIR}"
cp -r . /work/system/go
cd /work/system/go/src/
chmod -R +w ..
sed -i \
's,/lib/ld-musl-`+linuxArch+`.so.1,/system/bin/linker,' \
cmd/link/internal/`+arch+`/obj.go
sed -i \
's/cpu.X86.HasAVX512VBMI/& \&\& cpu.X86.HasPOPCNT/' \
internal/runtime/gc/scan/scan_amd64.go
rm \
os/root_unix_test.go \
cmd/cgo/internal/testsanitizers/tsan_test.go \
cmd/cgo/internal/testsanitizers/cshared_test.go
set +u
. ./make.bash "$@" --no-banner
set -u
`;
check = "bash run.bash --no-rebuild\n";
install = `
../bin/go tool dist banner # print build info
mkdir /work/system/bin
ln -s \
../go/bin/go \
../go/bin/gofmt \
/work/system/bin
`;
};
inputs = [ bash, go-bootstrap ];
}