ssa: fix Builder.Sigsetjmp for Linux

This follows up on #597.
This commit is contained in:
Aofei Sheng
2024-07-29 11:46:08 +08:00
parent 23bfaf1ba2
commit 3b5e8edd37
3 changed files with 17 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ import (
"debug/macho"
"fmt"
"go/ast"
"go/build"
"go/constant"
"go/token"
"go/types"
@@ -135,7 +136,12 @@ func Do(args []string, conf *Config) {
llssa.Initialize(llssa.InitAll)
prog := llssa.NewProgram(nil)
target := &llssa.Target{
GOOS: build.Default.GOOS,
GOARCH: build.Default.GOARCH,
}
prog := llssa.NewProgram(target)
sizes := prog.TypeSizes
dedup := packages.NewDeduper()
dedup.SetPreload(func(pkg *types.Package, files []*ast.File) {