Closed
Description
The go/types.Config
struct has a Sizes
field that specifies the function that the type checker should use to compute the size of a type. This function is itself a function of the CPU architecture and potentially the OS or toolchain as well. Only the underlying build system (go list, blaze, bazel) knows authoritatively what size to use, so go/packages should obtain this information from the build system rather than guessing based on GOARCH as it does now. One way to do this is to ask the underlying build system to compile a tiny program and inspect the compiler output.