toolchain_utils: Remove comparison to old wrapper from compiler_wrapper.

BUG=chromium:773875
TEST='go test' passes

Change-Id: Iecbe15067bf37fd86fbb8a907d42df32288821d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1884701
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Tobias Bosch <tbosch@google.com>
diff --git a/compiler_wrapper/compiler_wrapper.go b/compiler_wrapper/compiler_wrapper.go
index 1ab7e99..c614b99 100644
--- a/compiler_wrapper/compiler_wrapper.go
+++ b/compiler_wrapper/compiler_wrapper.go
@@ -5,7 +5,6 @@
 package main
 
 import (
-	"bytes"
 	"fmt"
 	"io"
 	"path/filepath"
@@ -29,11 +28,7 @@
 	}
 	exitCode := 0
 	if compilerErr == nil {
-		if cfg.oldWrapperPath != "" {
-			exitCode, compilerErr = callCompilerWithRunAndCompareToOldWrapper(env, cfg, inputCmd)
-		} else {
-			exitCode, compilerErr = callCompilerInternal(env, cfg, inputCmd)
-		}
+		exitCode, compilerErr = callCompilerInternal(env, cfg, inputCmd)
 	}
 	if compilerErr != nil {
 		printCompilerError(env.stderr(), compilerErr)
@@ -42,22 +37,6 @@
 	return exitCode
 }
 
-func callCompilerWithRunAndCompareToOldWrapper(env env, cfg *config, inputCmd *command) (exitCode int, err error) {
-	stdinBuffer := &bytes.Buffer{}
-	recordingEnv := &commandRecordingEnv{
-		env:         env,
-		stdinReader: teeStdinIfNeeded(env, inputCmd, stdinBuffer),
-	}
-	// Note: this won't do a real exec as recordingEnv redirects exec to run.
-	if exitCode, err = callCompilerInternal(recordingEnv, cfg, inputCmd); err != nil {
-		return 0, err
-	}
-	if err = compareToOldWrapper(env, cfg, inputCmd, stdinBuffer.Bytes(), recordingEnv.cmdResults, exitCode); err != nil {
-		return exitCode, err
-	}
-	return exitCode, nil
-}
-
 func callCompilerInternal(env env, cfg *config, inputCmd *command) (exitCode int, err error) {
 	if err := checkUnsupportedFlags(inputCmd); err != nil {
 		return 0, err