cross compilation

This commit is contained in:
Li Jie
2025-04-08 09:26:27 +08:00
parent a85d937482
commit e6c7627ee8
12 changed files with 496 additions and 102 deletions

View File

@@ -23,6 +23,7 @@ import (
"go/constant"
"go/token"
"go/types"
"os"
"testing"
"unsafe"
@@ -40,6 +41,12 @@ func TestEndDefer(t *testing.T) {
}
func TestUnsafeString(t *testing.T) {
wd, err := os.Getwd()
if err != nil {
t.Fatal(err)
}
os.Chdir("../../runtime")
defer os.Chdir(wd)
prog := NewProgram(nil)
prog.SetRuntime(func() *types.Package {
fset := token.NewFileSet()