1
0
mirror of https://github.com/golang/go synced 2024-11-18 05:04:47 -07:00

cmd/toolstash: don't try comparing "asm -V=full" output.

Added link as well, since they are all symmetric.

Follow-up on https://go-review.googlesource.com/c/tools/+/75670.

For golang/go#22552.

Change-Id: I12d951b800cd5fc7abc6d09e6a8a986e3f9f6936
Reviewed-on: https://go-review.googlesource.com/75672
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
griesemer 2017-11-02 15:51:16 -07:00 committed by Robert Griesemer
parent d620ba0fbb
commit 032dfd515a

View File

@ -176,15 +176,12 @@ var (
func canCmp(name string, args []string) bool {
switch name {
case "compile":
case "asm", "compile", "link":
if len(args) == 1 && (args[0] == "-V" || strings.HasPrefix(args[0], "-V=")) {
// cmd/go uses "compile -V=full" to query the
// compiler's build ID.
// cmd/go uses "compile -V=full" to query the tool's build ID.
return false
}
return true
case "link", "asm":
return true
}
return len(name) == 2 && '0' <= name[0] && name[0] <= '9' && (name[1] == 'a' || name[1] == 'g' || name[1] == 'l')
}