Skip to content

Commit

Permalink
fix: type sizing when cross-compiling (32-bit) (#5053)
Browse files Browse the repository at this point in the history
Co-authored-by: Fernandez Ludovic <[email protected]>
  • Loading branch information
gh2o and ldez authored Oct 3, 2024
1 parent 094668e commit a86d8ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/goanalysis/runner_loadingpackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"go/ast"
"go/build"
"go/parser"
"go/scanner"
"go/types"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a86d8ba

Please sign in to comment.