tools/go
Alan Donovan 87312bc3ed go/packages: use effective GOARCH to determine type size function
The typechecker's Sizes function is not currently set correctly.
The correct answer requires information known only to the build
system's query tool (go list, blaze query, etc), and we need to
add a mechanism for it to return this information.

In the meantime, we use this simple workaround: if the GOARCH
environment variable is set, we use that to determine sizes according
to the conventions of gc. Otherwise, we use the architecture for which
the application was compiled. Both could easily be incorrect, but this
is nonetheless progress.

This change should fix the tests of go/analysis/passes/shift,
which are currently broken for GOARCH=386 because the analysistest
driver uses go/packages, which ignores GOARCH.

Change-Id: Iabe3211ad513a9a94eadd6d8f4b2068f7abdd053
Reviewed-on: https://go-review.googlesource.com/c/141757
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-12 12:58:16 +00:00
..
analysis go/analysis/passes/ctrlflow: add test of modularity 2018-10-11 20:48:43 +00:00
ast go/ast/inspector: faster (amortized) AST traversals 2018-09-28 18:13:43 +00:00
buildutil go/...: make most tests pass with gccgo 2018-06-08 16:58:49 +00:00
callgraph go/callgraph/cha: fix bug computing correspondence of abstract/concrete methods 2018-02-21 01:23:17 +00:00
cfg go/cfg: a syntactic control-flow graph (CFG) 2018-09-26 00:57:46 +00:00
gccgoexportdata go/gccgoexportdata: correctly handle archive files containing string tables 2016-11-09 21:28:38 +00:00
gcexportdata go/gcexportdata: add -package flag to diagnostic tool 2018-06-27 17:17:06 +00:00
internal go/internal/gccgoimporter: remove special case for Go1.9 2018-09-27 15:01:54 +00:00
loader go/internal/cgo: simplify names of ProcessCgoFiles and RunCgo 2018-08-08 19:23:19 +00:00
packages go/packages: use effective GOARCH to determine type size function 2018-10-12 12:58:16 +00:00
pointer go/pointer: support reflect.Value in AddExtendedQuery 2018-08-13 20:51:10 +00:00
ssa go/ssa/interp: skip failing test 2018-09-25 15:50:07 +00:00
types go/types/objectpath: fix tests for pre-go1.11 2018-10-01 16:20:35 +00:00
vcs go/vcs: match go-import package prefixes by slash 2018-06-20 03:09:55 +00:00