From 2be66b663cb6cd53c024fe4a667ebccd8ef73091 Mon Sep 17 00:00:00 2001 From: Than McIntosh Date: Tue, 20 Oct 2020 16:42:21 -0400 Subject: [PATCH] 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 Run-TryBot: Than McIntosh gopls-CI: kokoro TryBot-Result: Go Bot Reviewed-by: Cherry Zhang --- cmd/toolstash/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/toolstash/main.go b/cmd/toolstash/main.go index da56361f56..6baf42ee53 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 @@ func compareTool() { return } - extra := "-S" + extra := "-S=2" switch { default: log.Fatalf("unknown tool %s", tool)