From 76f0ba3337b699425808c9f251112be7fb5126d5 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 11 Jul 2025 09:21:09 +0200 Subject: [PATCH 1/3] ci: rename some jobs to avoid churn on every Go/LLVM version bump --- .circleci/config.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a73dceae2..afa7a73001 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,14 +92,18 @@ commands: - /go/pkg/mod jobs: - test-llvm15-go122: + test-oldest: + # This tests our lowest supported versions of Go and LLVM, to make sure at + # least the smoke tests still pass. docker: - image: golang:1.22-bullseye steps: - test-linux: llvm: "15" resource_class: large - test-llvm20-go124: + test-newest: + # This tests the latest supported LLVM version when linking against system + # libraries. docker: - image: golang:1.24-bullseye steps: @@ -110,8 +114,5 @@ jobs: workflows: test-all: jobs: - # This tests our lowest supported versions of Go and LLVM, to make sure at - # least the smoke tests still pass. - - test-llvm15-go122 - # This tests LLVM 20 support when linking against system libraries. - - test-llvm20-go124 + - test-oldest + - test-newest From 3b521476b423fe7ec6c29dc4f86b4deef1652238 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 11 Jul 2025 15:45:42 +0200 Subject: [PATCH 2/3] reflect: implement Method.IsExported --- src/reflect/type.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/reflect/type.go b/src/reflect/type.go index 828cf12e27..884f89dc84 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -127,6 +127,11 @@ type Method struct { Index int // index for Type.Method } +// IsExported reports whether the method is exported. +func (m Method) IsExported() bool { + return m.PkgPath == "" +} + // The following Type type has been copied almost entirely from // https://github.com/golang/go/blob/go1.15/src/reflect/type.go#L27-L212. // Some methods have been commented out as they haven't yet been implemented. From c846d56ecb190fb4f7d30c444c87f50df35132ae Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 11 Jul 2025 09:34:44 +0200 Subject: [PATCH 3/3] all: add Go 1.25 support --- .circleci/config.yml | 2 +- .github/workflows/build-macos.yml | 4 ++-- .github/workflows/linux.yml | 8 ++++---- .github/workflows/windows.yml | 8 ++++---- Dockerfile | 4 ++-- builder/config.go | 2 +- src/internal/abi/escape.go | 7 +++++++ src/runtime/time.go | 6 ++++++ 8 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index afa7a73001..68a013a253 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -105,7 +105,7 @@ jobs: # This tests the latest supported LLVM version when linking against system # libraries. docker: - - image: golang:1.24-bullseye + - image: golang:1.25rc2-bullseye steps: - test-linux: llvm: "20" diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index bda9474327..564978c821 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -39,7 +39,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Restore LLVM source cache uses: actions/cache/restore@v4 @@ -134,7 +134,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Build TinyGo (LLVM ${{ matrix.version }}) run: go install -tags=llvm${{ matrix.version }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 803759892f..52e49eaff2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,7 @@ jobs: # statically linked binary. runs-on: ubuntu-latest container: - image: golang:1.24-alpine + image: golang:1.25rc2-alpine outputs: version: ${{ steps.version.outputs.version }} steps: @@ -137,7 +137,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Install wasmtime uses: bytecodealliance/actions/wasmtime/setup@v1 @@ -181,7 +181,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Install Node.js uses: actions/setup-node@v4 @@ -298,7 +298,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Restore LLVM source cache uses: actions/cache/restore@v4 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6c428c98c4..ee7fbf1adb 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -41,7 +41,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Restore cached LLVM source uses: actions/cache/restore@v4 @@ -147,7 +147,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Download TinyGo build uses: actions/download-artifact@v4 @@ -177,7 +177,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Download TinyGo build uses: actions/download-artifact@v4 @@ -213,7 +213,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25.0-rc.2' cache: true - name: Download TinyGo build uses: actions/download-artifact@v4 diff --git a/Dockerfile b/Dockerfile index 520ad7c9b5..c45dd5d777 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # tinygo-llvm stage obtains the llvm source for TinyGo -FROM golang:1.24 AS tinygo-llvm +FROM golang:1.25rc2 AS tinygo-llvm RUN apt-get update && \ apt-get install -y apt-utils make cmake clang-15 ninja-build && \ @@ -33,7 +33,7 @@ RUN cd /tinygo/ && \ # tinygo-compiler copies the compiler build over to a base Go container (without # all the build tools etc). -FROM golang:1.24 AS tinygo-compiler +FROM golang:1.25rc2 AS tinygo-compiler # Copy tinygo build. COPY --from=tinygo-compiler-build /tinygo/build/release/tinygo /tinygo diff --git a/builder/config.go b/builder/config.go index b36b9333f3..5fb74ee192 100644 --- a/builder/config.go +++ b/builder/config.go @@ -26,7 +26,7 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) { // Version range supported by TinyGo. const minorMin = 19 - const minorMax = 24 + const minorMax = 25 // Check that we support this Go toolchain version. gorootMajor, gorootMinor, err := goenv.GetGorootVersion() diff --git a/src/internal/abi/escape.go b/src/internal/abi/escape.go index 0ecdf80308..d8b9c778a0 100644 --- a/src/internal/abi/escape.go +++ b/src/internal/abi/escape.go @@ -8,3 +8,10 @@ import "unsafe" func NoEscape(p unsafe.Pointer) unsafe.Pointer { return p } + +func Escape[T any](x T) T { + // This function is used from internal/synctest which doesn't seem to be + // used much by other packages. + // This probably needs support from the compiler to implement correctly. + panic("internal/abi.Escape: unimplemented") +} diff --git a/src/runtime/time.go b/src/runtime/time.go index 3935b4486e..23a9bf5e2f 100644 --- a/src/runtime/time.go +++ b/src/runtime/time.go @@ -46,3 +46,9 @@ func timerCallback(tn *timerNode, delta int64) { addTimer(tn) } } + +//go:linkname time_runtimeIsBubbled time.runtimeIsBubbled +func time_runtimeIsBubbled() bool { + // We don't currently support bubbles. + return false +}