
Precise globals require a whole program optimization pass that is hard to support when building packages separately. This patch removes support for these globals by converting the last use (Linux) to use linker-defined symbols instead. For details, see: https://github.com/tinygo-org/tinygo/issues/2870
15 строки
278 Б
Go
15 строки
278 Б
Go
package transform_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/tinygo-org/tinygo/transform"
|
|
"tinygo.org/x/go-llvm"
|
|
)
|
|
|
|
func TestMakeGCStackSlots(t *testing.T) {
|
|
t.Parallel()
|
|
testTransform(t, "testdata/gc-stackslots", func(mod llvm.Module) {
|
|
transform.MakeGCStackSlots(mod)
|
|
})
|
|
}
|