mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile,cmd/internal/objabi: abstract out object header string
Change-Id: Idbbb4cb7127b93afa34a8aa18bbdaad1f206ab6a Reviewed-on: https://go-review.googlesource.com/c/go/+/308090 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
b675e52e95
commit
89ca1ce9a8
3 changed files with 13 additions and 4 deletions
|
|
@ -243,9 +243,9 @@ func importfile(decl *syntax.ImportDecl) *types.Pkg {
|
|||
base.Errorf("import %s: not a go object file: %s", file, p)
|
||||
base.ErrorExit()
|
||||
}
|
||||
q := fmt.Sprintf("%s %s %s %s\n", objabi.GOOS, objabi.GOARCH, objabi.Version, objabi.Expstring())
|
||||
if p[10:] != q {
|
||||
base.Errorf("import %s: object is [%s] expected [%s]", file, p[10:], q)
|
||||
q := objabi.HeaderString()
|
||||
if p != q {
|
||||
base.Errorf("import %s: object is [%s] expected [%s]", file, p, q)
|
||||
base.ErrorExit()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue