Skip to content

Commit 33f7b10

Browse files
committed
all: add Go 1.24 support
1 parent 2044f6f commit 33f7b10

File tree

8 files changed

+34
-17
lines changed

8 files changed

+34
-17
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ jobs:
109109
# "make lint" fails before go 1.21 because internal/tools/go.mod specifies packages that require go 1.21
110110
fmt-check: false
111111
resource_class: large
112-
test-llvm19-go123:
112+
test-llvm19-go124:
113113
docker:
114-
- image: golang:1.23-bullseye
114+
- image: golang:1.24-bullseye
115115
steps:
116116
- test-linux:
117117
llvm: "19"
@@ -124,4 +124,4 @@ workflows:
124124
# least the smoke tests still pass.
125125
- test-llvm15-go119
126126
# This tests LLVM 19 support when linking against system libraries.
127-
- test-llvm19-go123
127+
- test-llvm19-go124

.github/workflows/build-macos.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Install Go
4040
uses: actions/setup-go@v5
4141
with:
42-
go-version: '1.23'
42+
go-version: '1.24'
4343
cache: true
4444
- name: Restore LLVM source cache
4545
uses: actions/cache/restore@v4
@@ -143,7 +143,7 @@ jobs:
143143
- name: Install Go
144144
uses: actions/setup-go@v5
145145
with:
146-
go-version: '1.23'
146+
go-version: '1.24'
147147
cache: true
148148
- name: Build TinyGo (LLVM ${{ matrix.version }})
149149
run: go install -tags=llvm${{ matrix.version }}

.github/workflows/linux.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# statically linked binary.
1919
runs-on: ubuntu-latest
2020
container:
21-
image: golang:1.23-alpine
21+
image: golang:1.24-alpine
2222
outputs:
2323
version: ${{ steps.version.outputs.version }}
2424
steps:
@@ -146,7 +146,7 @@ jobs:
146146
- name: Install Go
147147
uses: actions/setup-go@v5
148148
with:
149-
go-version: '1.23'
149+
go-version: '1.24'
150150
cache: true
151151
- name: Install wasmtime
152152
uses: bytecodealliance/actions/wasmtime/setup@v1
@@ -189,7 +189,7 @@ jobs:
189189
- name: Install Go
190190
uses: actions/setup-go@v5
191191
with:
192-
go-version: '1.23'
192+
go-version: '1.24'
193193
cache: true
194194
- name: Install Node.js
195195
uses: actions/setup-node@v4
@@ -315,7 +315,7 @@ jobs:
315315
- name: Install Go
316316
uses: actions/setup-go@v5
317317
with:
318-
go-version: '1.23'
318+
go-version: '1.24'
319319
cache: true
320320
- name: Restore LLVM source cache
321321
uses: actions/cache/restore@v4

.github/workflows/windows.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install Go
4242
uses: actions/setup-go@v5
4343
with:
44-
go-version: '1.23'
44+
go-version: '1.24'
4545
cache: true
4646
- name: Restore cached LLVM source
4747
uses: actions/cache/restore@v4
@@ -156,7 +156,7 @@ jobs:
156156
- name: Install Go
157157
uses: actions/setup-go@v5
158158
with:
159-
go-version: '1.23'
159+
go-version: '1.24'
160160
cache: true
161161
- name: Download TinyGo build
162162
uses: actions/download-artifact@v4
@@ -186,7 +186,7 @@ jobs:
186186
- name: Install Go
187187
uses: actions/setup-go@v5
188188
with:
189-
go-version: '1.23'
189+
go-version: '1.24'
190190
cache: true
191191
- name: Download TinyGo build
192192
uses: actions/download-artifact@v4
@@ -222,7 +222,7 @@ jobs:
222222
- name: Install Go
223223
uses: actions/setup-go@v5
224224
with:
225-
go-version: '1.23'
225+
go-version: '1.24'
226226
cache: true
227227
- name: Download TinyGo build
228228
uses: actions/download-artifact@v4

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# tinygo-llvm stage obtains the llvm source for TinyGo
2-
FROM golang:1.23 AS tinygo-llvm
2+
FROM golang:1.24 AS tinygo-llvm
33

44
RUN apt-get update && \
55
apt-get install -y apt-utils make cmake clang-15 ninja-build && \
@@ -33,7 +33,7 @@ RUN cd /tinygo/ && \
3333

3434
# tinygo-compiler copies the compiler build over to a base Go container (without
3535
# all the build tools etc).
36-
FROM golang:1.23 AS tinygo-compiler
36+
FROM golang:1.24 AS tinygo-compiler
3737

3838
# Copy tinygo build.
3939
COPY --from=tinygo-compiler-build /tinygo/build/release/tinygo /tinygo

builder/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) {
2626

2727
// Version range supported by TinyGo.
2828
const minorMin = 19
29-
const minorMax = 23
29+
const minorMax = 24
3030

3131
// Check that we support this Go toolchain version.
3232
gorootMajor, gorootMinor, err := goenv.GetGorootVersion()
@@ -36,7 +36,7 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) {
3636
if gorootMajor != 1 || gorootMinor < minorMin || gorootMinor > minorMax {
3737
// Note: when this gets updated, also update the Go compatibility matrix:
3838
// https://github.com/tinygo-org/tinygo-site/blob/dev/content/docs/reference/go-compat-matrix.md
39-
return nil, fmt.Errorf("requires go version 1.19 through 1.23, got go%d.%d", gorootMajor, gorootMinor)
39+
return nil, fmt.Errorf("requires go version 1.%d through 1.%d, got go%d.%d", minorMin, minorMax, gorootMajor, gorootMinor)
4040
}
4141

4242
// Check that the Go toolchain version isn't too new, if we haven't been

src/reflect/value.go

+4
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ func (v Value) Comparable() bool {
271271
}
272272
}
273273

274+
func (v Value) Equal(u Value) bool {
275+
panic("unimplemented: reflect.Value.Equal")
276+
}
277+
274278
func (v Value) Addr() Value {
275279
if !v.CanAddr() {
276280
panic("reflect.Value.Addr of unaddressable value")

src/runtime/time.go

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
package runtime
22

3+
//go:linkname time_runtimeNano time.runtimeNano
4+
func time_runtimeNano() int64 {
5+
// Note: we're ignoring sync groups here (package testing/synctest).
6+
// See: https://github.com/golang/go/issues/67434
7+
return nanotime()
8+
}
9+
10+
//go:linkname time_runtimeNow time.runtimeNow
11+
func time_runtimeNow() (sec int64, nsec int32, mono int64) {
12+
// Also ignoring the sync group here, like time_runtimeNano above.
13+
return now()
14+
}
15+
316
// timerNode is an element in a linked list of timers.
417
type timerNode struct {
518
next *timerNode

0 commit comments

Comments
 (0)