Skip to content

Commit a86d8ba

Browse files
gh2oldez
andauthored
fix: type sizing when cross-compiling (32-bit) (#5053)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 094668e commit a86d8ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/goanalysis/runner_loadingpackage.go

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"errors"
55
"fmt"
66
"go/ast"
7+
"go/build"
78
"go/parser"
89
"go/scanner"
910
"go/types"
@@ -164,6 +165,7 @@ func (lp *loadingPackage) loadFromSource(loadMode LoadMode) error {
164165
pkg.Errors = append(pkg.Errors, lp.convertError(err)...)
165166
},
166167
GoVersion: rv, // TODO(ldez) temporary workaround
168+
Sizes: types.SizesFor(build.Default.Compiler, build.Default.GOARCH),
167169
}
168170

169171
_ = types.NewChecker(tc, pkg.Fset, pkg.Types, pkg.TypesInfo).Files(pkg.Syntax)

0 commit comments

Comments
 (0)