cmd/toolstash: pass -S=2 when comparing toolchains
For "toolstash -cmp", run builds with "-S=2" as opposed to just "-S".
The additional output from "-S=2" includes aux data (including DWARF
symbols) and ABIs for function symbols, both of which are potentially
important for comparison purposes.
Change-Id: Iba273d82b46e0b08ab4c83ca16fd22c0c0f7e68b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/263979
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
diff --git a/cmd/toolstash/main.go b/cmd/toolstash/main.go
index da56361..6baf42e 100644
--- a/cmd/toolstash/main.go
+++ b/cmd/toolstash/main.go
@@ -45,7 +45,7 @@
// copy of an assembler or compiler and check that they produce identical
// object files. If not, toolstash reports the mismatch and exits with a failure status.
// As part of reporting the mismatch, toolstash reinvokes the command with
-// the -S flag and identifies the first divergence in the assembly output.
+// the -S=2 flag and identifies the first divergence in the assembly output.
// If the command is a Go compiler, toolstash also determines whether the
// difference is triggered by optimization passes.
// On failure, toolstash leaves additional information in files named
@@ -275,7 +275,7 @@
return
}
- extra := "-S"
+ extra := "-S=2"
switch {
default:
log.Fatalf("unknown tool %s", tool)