mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 15:03:41 +00:00
wasm: add Boehm GC support
This adds support for `-gc=boehm` on `-target=wasip1` and `-target=wasm` (in a browser or NodeJS). Notably it does *not* add Boehm GC support for `-target=wasip2`, since that target doesn't have a real libc.
This commit is contained in:
committed by
Ron Evans
parent
9c3b706533
commit
c08b2dfe06
+17
-1
@@ -178,11 +178,27 @@ func TestBuild(t *testing.T) {
|
||||
|
||||
t.Run("WebAssembly", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
runPlatTests(optionsFromTarget("wasm", sema), tests, t)
|
||||
// Test with -gc=boehm.
|
||||
t.Run("gc.go-boehm", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
optionsBoehm := optionsFromTarget("wasm", sema)
|
||||
optionsBoehm.GC = "boehm"
|
||||
runTest("gc.go", optionsBoehm, t, nil, nil)
|
||||
})
|
||||
})
|
||||
t.Run("WASI", func(t *testing.T) {
|
||||
t.Run("WASIp1", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
runPlatTests(optionsFromTarget("wasip1", sema), tests, t)
|
||||
|
||||
// Test with -gc=boehm.
|
||||
t.Run("gc.go-boehm", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
optionsBoehm := optionsFromTarget("wasip1", sema)
|
||||
optionsBoehm.GC = "boehm"
|
||||
runTest("gc.go", optionsBoehm, t, nil, nil)
|
||||
})
|
||||
})
|
||||
t.Run("WASIp2", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
Reference in New Issue
Block a user