diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a73dceae2..68a013a253 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,16 +92,20 @@ 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 + - image: golang:1.25rc2-bullseye steps: - test-linux: llvm: "20" @@ -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 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/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. 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 +}