Skip to content

Commit d2c73a0

Browse files
committed
Merge branch 'release' into feat/uefi
2 parents d5f3883 + 3869f76 commit d2c73a0

File tree

80 files changed

+1346
-667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1346
-667
lines changed

.circleci/config.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,20 @@ commands:
9292
- /go/pkg/mod
9393

9494
jobs:
95-
test-llvm15-go122:
95+
test-oldest:
96+
# This tests our lowest supported versions of Go and LLVM, to make sure at
97+
# least the smoke tests still pass.
9698
docker:
9799
- image: golang:1.22-bullseye
98100
steps:
99101
- test-linux:
100102
llvm: "15"
101103
resource_class: large
102-
test-llvm20-go124:
104+
test-newest:
105+
# This tests the latest supported LLVM version when linking against system
106+
# libraries.
103107
docker:
104-
- image: golang:1.24-bullseye
108+
- image: golang:1.25-bullseye
105109
steps:
106110
- test-linux:
107111
llvm: "20"
@@ -110,8 +114,6 @@ jobs:
110114
workflows:
111115
test-all:
112116
jobs:
113-
# This tests our lowest supported versions of Go and LLVM, to make sure at
114-
# least the smoke tests still pass.
115-
- test-llvm15-go122
116-
# This tests LLVM 20 support when linking against system libraries.
117-
- test-llvm20-go124
117+
- test-oldest
118+
# disable this test, since CircleCI seems unable to download due to rate-limits on Dockerhub.
119+
# - test-newest

.github/workflows/build-macos.yml

Lines changed: 2 additions & 2 deletions
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.24'
42+
go-version: '1.25.0'
4343
cache: true
4444
- name: Restore LLVM source cache
4545
uses: actions/cache/restore@v4
@@ -134,7 +134,7 @@ jobs:
134134
- name: Install Go
135135
uses: actions/setup-go@v5
136136
with:
137-
go-version: '1.24'
137+
go-version: '1.25.0'
138138
cache: true
139139
- name: Build TinyGo (LLVM ${{ matrix.version }})
140140
run: go install -tags=llvm${{ matrix.version }}

.github/workflows/linux.yml

Lines changed: 4 additions & 4 deletions
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.24-alpine
21+
image: golang:1.25-alpine
2222
outputs:
2323
version: ${{ steps.version.outputs.version }}
2424
steps:
@@ -137,7 +137,7 @@ jobs:
137137
- name: Install Go
138138
uses: actions/setup-go@v5
139139
with:
140-
go-version: '1.24'
140+
go-version: '1.25.0'
141141
cache: true
142142
- name: Install wasmtime
143143
uses: bytecodealliance/actions/wasmtime/setup@v1
@@ -181,7 +181,7 @@ jobs:
181181
- name: Install Go
182182
uses: actions/setup-go@v5
183183
with:
184-
go-version: '1.24'
184+
go-version: '1.25.0'
185185
cache: true
186186
- name: Install Node.js
187187
uses: actions/setup-node@v4
@@ -298,7 +298,7 @@ jobs:
298298
- name: Install Go
299299
uses: actions/setup-go@v5
300300
with:
301-
go-version: '1.24'
301+
go-version: '1.25.0'
302302
cache: true
303303
- name: Restore LLVM source cache
304304
uses: actions/cache/restore@v4

.github/workflows/windows.yml

Lines changed: 4 additions & 4 deletions
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.24'
44+
go-version: '1.25.0'
4545
cache: true
4646
- name: Restore cached LLVM source
4747
uses: actions/cache/restore@v4
@@ -147,7 +147,7 @@ jobs:
147147
- name: Install Go
148148
uses: actions/setup-go@v5
149149
with:
150-
go-version: '1.24'
150+
go-version: '1.25.0'
151151
cache: true
152152
- name: Download TinyGo build
153153
uses: actions/download-artifact@v4
@@ -177,7 +177,7 @@ jobs:
177177
- name: Install Go
178178
uses: actions/setup-go@v5
179179
with:
180-
go-version: '1.24'
180+
go-version: '1.25.0'
181181
cache: true
182182
- name: Download TinyGo build
183183
uses: actions/download-artifact@v4
@@ -213,7 +213,7 @@ jobs:
213213
- name: Install Go
214214
uses: actions/setup-go@v5
215215
with:
216-
go-version: '1.24'
216+
go-version: '1.25.0'
217217
cache: true
218218
- name: Download TinyGo build
219219
uses: actions/download-artifact@v4

BUILDING.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,17 @@ Try running TinyGo:
8585

8686
./build/tinygo help
8787

88-
Also, make sure the `tinygo` binary really is statically linked. Check this
89-
using `ldd` (not to be confused with `lld`):
88+
Also, make sure the `tinygo` binary really is statically linked. The command to check for
89+
dynamic dependencies differs depending on your operating system.
90+
91+
On Linux, use `ldd` (not to be confused with `lld`):
9092

9193
ldd ./build/tinygo
9294

95+
On macOS, use otool -L:
96+
97+
otool -L ./build/tinygo
98+
9399
The result should not contain libclang or libLLVM.
94100

95101
## Make a release tarball

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
0.39.0
2+
---
3+
* **general**
4+
- all: add Go 1.25 support
5+
- net: update to latest tinygo net package
6+
- docs: clarify build verification step for macOS users
7+
- Add flag to skip Renesas SVD builds
8+
* **build**
9+
- Makefile: install missing dlmalloc files
10+
- flash: add -o flag support to save built binary (Fixes #4937) (#4942)
11+
- fix: update version of clang to 17 to accommodate latest Go 1.25 docker base image
12+
* **ci**
13+
- chore: update all CI builds to test Go 1.25 release
14+
- fix: disable test-newest since CircleCI seems unable to download due to rate-limits on Dockerhub
15+
- ci: rename some jobs to avoid churn on every Go/LLVM version bump
16+
- ci: make the goroutines test less racy
17+
- tests: de-flake goroutines test
18+
* **compiler**
19+
- compiler: implement internal/abi.Escape
20+
* **main**
21+
- main: show the compiler error (if any) for `tinygo test -c`
22+
- chore: correct GOOS=js name in error messages for WASM
23+
* **machine**
24+
- machine: add international keys
25+
- machine: remove some unnecessary "// peripherals:" comments
26+
- machine: add I2C pin comments
27+
- machine: standardize I2C errors with "i2c:" prefix
28+
- machine: make I2C usable in the simulator
29+
- fix: add SPI and I2C to teensy 4.1 (#4943)
30+
- `rp2`: use the correct channel mask for rp2350 ADC; hold lock during read (#4938)
31+
- `rp2`: disable digital input for analog inputs
32+
* **runtime**
33+
- runtime: ensure time.Sleep(d) sleeps at least d
34+
- runtime: stub out weak pointer support
35+
- runtime: implement dummy AddCleanup
36+
- runtime: enable multi-core scheduler for rp2350
37+
- `internal/task`: use -stack-size flag when starting a new thread
38+
- `internal/task`: add SA_RESTART flag to GC interrupts
39+
- `internal/task`: a few small correctness fixes
40+
- `internal/gclayout`: make gclayout values constants
41+
- darwin: add threading support and use it by default
42+
* **standard library**
43+
- `sync`: implement sync.Swap
44+
- `reflect`: implement Method.IsExported
45+
* **testing**
46+
- testing: stub out testing.B.Loop
47+
* **targets**
48+
- `stm32`: add support for the STM32L031G6U6
49+
- add metro-rp2350 board definition (#4989)
50+
- `rp2040/rp2350`: set the default stack size to 8k for rp2040/rp2350 based boards where this was not already the case
51+
52+
153
0.38.0
254
---
355
* **general**

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# tinygo-llvm stage obtains the llvm source for TinyGo
2-
FROM golang:1.24 AS tinygo-llvm
2+
FROM golang:1.25 AS tinygo-llvm
33

44
RUN apt-get update && \
5-
apt-get install -y apt-utils make cmake clang-15 ninja-build && \
5+
apt-get install -y apt-utils make cmake clang-17 ninja-build && \
66
rm -rf \
77
/var/lib/apt/lists/* \
88
/var/log/* \
@@ -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.24 AS tinygo-compiler
36+
FROM golang:1.25 AS tinygo-compiler
3737

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

GNUmakefile

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ fmt-check: ## Warn if any source needs reformatting
187187
@unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1
188188

189189

190-
gen-device: gen-device-avr gen-device-esp gen-device-nrf gen-device-sam gen-device-sifive gen-device-kendryte gen-device-nxp gen-device-rp gen-device-renesas ## Generate microcontroller-specific sources
190+
gen-device: gen-device-avr gen-device-esp gen-device-nrf gen-device-sam gen-device-sifive gen-device-kendryte gen-device-nxp gen-device-rp ## Generate microcontroller-specific sources
191+
ifneq ($(RENESAS), 0)
192+
gen-device: gen-device-renesas
193+
endif
191194
ifneq ($(STM32), 0)
192195
gen-device: gen-device-stm32
193196
endif
@@ -457,38 +460,42 @@ TEST_PACKAGES_HOST := $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_WINDOWS)
457460
TEST_IOFS := false
458461
endif
459462

463+
TEST_SKIP_FLAG := -skip='TestExtraMethods|TestParseAndBytesRoundTrip/P256/Generic'
464+
460465
# Test known-working standard library packages.
461466
# TODO: parallelize, and only show failing tests (no implied -v flag).
462467
.PHONY: tinygo-test
463468
tinygo-test:
464-
$(TINYGO) test $(TEST_PACKAGES_HOST) $(TEST_PACKAGES_SLOW)
469+
@# TestExtraMethods: used by many crypto packages and uses reflect.Type.Method which is not implemented.
470+
@# TestParseAndBytesRoundTrip/P256/Generic: relies on t.Skip() which is not implemented
471+
$(TINYGO) test $(TEST_SKIP_FLAG) $(TEST_PACKAGES_HOST) $(TEST_PACKAGES_SLOW)
465472
@# io/fs requires os.ReadDir, not yet supported on windows or wasi. It also
466473
@# requires a large stack-size. Hence, io/fs is only run conditionally.
467474
@# For more details, see the comments on issue #3143.
468475
ifeq ($(TEST_IOFS),true)
469476
$(TINYGO) test -stack-size=6MB io/fs
470477
endif
471478
tinygo-test-fast:
472-
$(TINYGO) test $(TEST_PACKAGES_HOST)
479+
$(TINYGO) test $(TEST_SKIP_FLAG) $(TEST_PACKAGES_HOST)
473480
tinygo-bench:
474481
$(TINYGO) test -bench . $(TEST_PACKAGES_HOST) $(TEST_PACKAGES_SLOW)
475482
tinygo-bench-fast:
476483
$(TINYGO) test -bench . $(TEST_PACKAGES_HOST)
477484

478485
# Same thing, except for wasi rather than the current platform.
479486
tinygo-test-wasm:
480-
$(TINYGO) test -target wasm $(TEST_PACKAGES_WASM)
487+
$(TINYGO) test -target wasm $(TEST_SKIP_FLAG) $(TEST_PACKAGES_WASM)
481488
tinygo-test-wasi:
482-
$(TINYGO) test -target wasip1 $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi
489+
$(TINYGO) test -target wasip1 $(TEST_SKIP_FLAG) $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi
483490
tinygo-test-wasip1:
484-
GOOS=wasip1 GOARCH=wasm $(TINYGO) test $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi
491+
GOOS=wasip1 GOARCH=wasm $(TINYGO) test $(TEST_SKIP_FLAG) $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi
485492
tinygo-test-wasip1-fast:
486-
$(TINYGO) test -target=wasip1 $(TEST_PACKAGES_FAST) ./tests/runtime_wasi
493+
$(TINYGO) test -target=wasip1 $(TEST_SKIP_FLAG) $(TEST_PACKAGES_FAST) ./tests/runtime_wasi
487494

488495
tinygo-test-wasip2-slow:
489-
$(TINYGO) test -target=wasip2 $(TEST_PACKAGES_SLOW)
496+
$(TINYGO) test -target=wasip2 $(TEST_SKIP_FLAG) $(TEST_PACKAGES_SLOW)
490497
tinygo-test-wasip2-fast:
491-
$(TINYGO) test -target=wasip2 $(TEST_PACKAGES_FAST) ./tests/runtime_wasi
498+
$(TINYGO) test -target=wasip2 $(TEST_SKIP_FLAG) $(TEST_PACKAGES_FAST) ./tests/runtime_wasi
492499

493500
tinygo-test-wasip2-sum-slow:
494501
TINYGO=$(TINYGO) \
@@ -514,7 +521,7 @@ tinygo-bench-wasip2-fast:
514521

515522
# Run tests on riscv-qemu since that one provides a large amount of memory.
516523
tinygo-test-baremetal:
517-
$(TINYGO) test -target riscv-qemu $(TEST_PACKAGES_BAREMETAL)
524+
$(TINYGO) test -target riscv-qemu $(TEST_SKIP_FLAG) $(TEST_PACKAGES_BAREMETAL)
518525

519526
# Test external packages in a large corpus.
520527
test-corpus:
@@ -778,6 +785,8 @@ endif
778785
@$(MD5SUM) test.hex
779786
$(TINYGO) build -size short -o test.hex -target=pico-plus2 examples/blinky1
780787
@$(MD5SUM) test.hex
788+
$(TINYGO) build -size short -o test.hex -target=metro-rp2350 examples/blinky1
789+
@$(MD5SUM) test.hex
781790
$(TINYGO) build -size short -o test.hex -target=waveshare-rp2040-tiny examples/echo
782791
@$(MD5SUM) test.hex
783792
# test pwm
@@ -837,6 +846,8 @@ ifneq ($(STM32), 0)
837846
@$(MD5SUM) test.hex
838847
$(TINYGO) build -size short -o test.hex -target=mksnanov3 examples/blinky1
839848
@$(MD5SUM) test.hex
849+
$(TINYGO) build -size short -o test.hex -target=stm32l0x1 examples/serial
850+
@$(MD5SUM) test.hex
840851
endif
841852
$(TINYGO) build -size short -o test.hex -target=atmega328pb examples/blinkm
842853
@$(MD5SUM) test.hex
@@ -907,7 +918,7 @@ endif
907918
$(TINYGO) build -size short -o test.hex -target=hw-651 examples/machinetest
908919
@$(MD5SUM) test.hex
909920
$(TINYGO) build -size short -o test.hex -target=hw-651-s110v8 examples/machinetest
910-
@$(MD5SUM) test.hex
921+
@$(MD5SUM) test.hex
911922
ifneq ($(WASM), 0)
912923
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/export
913924
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/main
@@ -963,6 +974,7 @@ build/release: tinygo gen-device $(if $(filter 1,$(USE_SYSTEM_BINARYEN)),,binary
963974
@mkdir -p build/release/tinygo/lib/nrfx
964975
@mkdir -p build/release/tinygo/lib/picolibc/newlib/libc
965976
@mkdir -p build/release/tinygo/lib/picolibc/newlib/libm
977+
@mkdir -p build/release/tinygo/lib/wasi-libc/dlmalloc
966978
@mkdir -p build/release/tinygo/lib/wasi-libc/libc-bottom-half
967979
@mkdir -p build/release/tinygo/lib/wasi-libc/libc-top-half/musl/arch
968980
@mkdir -p build/release/tinygo/lib/wasi-libc/libc-top-half/musl/src
@@ -1034,6 +1046,7 @@ endif
10341046
@cp -rp lib/picolibc/newlib/libm/common build/release/tinygo/lib/picolibc/newlib/libm
10351047
@cp -rp lib/picolibc/newlib/libm/math build/release/tinygo/lib/picolibc/newlib/libm
10361048
@cp -rp lib/picolibc-stdio.c build/release/tinygo/lib
1049+
@cp -rp lib/wasi-libc/dlmalloc/src build/release/tinygo/lib/wasi-libc/dlmalloc
10371050
@cp -rp lib/wasi-libc/libc-bottom-half/cloudlibc build/release/tinygo/lib/wasi-libc/libc-bottom-half
10381051
@cp -rp lib/wasi-libc/libc-bottom-half/headers build/release/tinygo/lib/wasi-libc/libc-bottom-half
10391052
@cp -rp lib/wasi-libc/libc-bottom-half/sources build/release/tinygo/lib/wasi-libc/libc-bottom-half

builder/config.go

Lines changed: 1 addition & 1 deletion
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 = 24
29+
const minorMax = 25
3030

3131
// Check that we support this Go toolchain version.
3232
gorootMajor, gorootMinor, err := goenv.GetGorootVersion()

builder/sizes_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ func TestBinarySize(t *testing.T) {
4242
// This is a small number of very diverse targets that we want to test.
4343
tests := []sizeTest{
4444
// microcontrollers
45-
{"hifive1b", "examples/echo", 4556, 280, 0, 2264},
46-
{"microbit", "examples/serial", 2920, 388, 8, 2272},
47-
{"wioterminal", "examples/pininterrupt", 7379, 1489, 116, 6912},
45+
{"hifive1b", "examples/echo", 4580, 280, 0, 2264},
46+
{"microbit", "examples/serial", 2928, 388, 8, 2272},
47+
{"wioterminal", "examples/pininterrupt", 7387, 1489, 116, 6912},
4848

4949
// TODO: also check wasm. Right now this is difficult, because
5050
// wasm binaries are run through wasm-opt and therefore the

0 commit comments

Comments
 (0)