mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
gotype: fix default importer for Go 1.8.
Importer "source" does not exist in Go 1.8, so this means that default usage of gotype is broken in that compiler version. Change-Id: I517520b0cac7c62a3e213d0647a3d621e8ced58c Reviewed-on: https://go-review.googlesource.com/40091 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
4436e54754
commit
5584fb0720
@ -108,7 +108,7 @@ var (
|
|||||||
xtestFiles = flag.Bool("x", false, "consider only external test files in a directory")
|
xtestFiles = flag.Bool("x", false, "consider only external test files in a directory")
|
||||||
allErrors = flag.Bool("e", false, "report all errors, not just the first 10")
|
allErrors = flag.Bool("e", false, "report all errors, not just the first 10")
|
||||||
verbose = flag.Bool("v", false, "verbose mode")
|
verbose = flag.Bool("v", false, "verbose mode")
|
||||||
compiler = flag.String("c", "source", "compiler used for installed packages (gc, gccgo, or source)")
|
compiler = flag.String("c", defaultCompiler, "compiler used for installed packages (gc, gccgo, or source)")
|
||||||
|
|
||||||
// additional output control
|
// additional output control
|
||||||
printAST = flag.Bool("ast", false, "print AST (forces -seq)")
|
printAST = flag.Bool("ast", false, "print AST (forces -seq)")
|
||||||
|
@ -11,6 +11,8 @@ package main
|
|||||||
|
|
||||||
import "go/types"
|
import "go/types"
|
||||||
|
|
||||||
|
const defaultCompiler = "gc"
|
||||||
|
|
||||||
var gcArchSizes = map[string]*types.StdSizes{
|
var gcArchSizes = map[string]*types.StdSizes{
|
||||||
"386": {4, 4},
|
"386": {4, 4},
|
||||||
"arm": {4, 4},
|
"arm": {4, 4},
|
||||||
|
@ -8,6 +8,8 @@ package main
|
|||||||
|
|
||||||
import "go/types"
|
import "go/types"
|
||||||
|
|
||||||
|
const defaultCompiler = "source"
|
||||||
|
|
||||||
func SizesFor(compiler, arch string) types.Sizes {
|
func SizesFor(compiler, arch string) types.Sizes {
|
||||||
return types.SizesFor(compiler, arch)
|
return types.SizesFor(compiler, arch)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user