fix: type sizing when cross-compiling (32-bit) (#5053)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
094668e305
commit
a86d8baa53
@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"go/build"
|
||||
"go/parser"
|
||||
"go/scanner"
|
||||
"go/types"
|
||||
@ -164,6 +165,7 @@ func (lp *loadingPackage) loadFromSource(loadMode LoadMode) error {
|
||||
pkg.Errors = append(pkg.Errors, lp.convertError(err)...)
|
||||
},
|
||||
GoVersion: rv, // TODO(ldez) temporary workaround
|
||||
Sizes: types.SizesFor(build.Default.Compiler, build.Default.GOARCH),
|
||||
}
|
||||
|
||||
_ = types.NewChecker(tc, pkg.Fset, pkg.Types, pkg.TypesInfo).Files(pkg.Syntax)
|
||||
|
Loading…
x
Reference in New Issue
Block a user