aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/env.go
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-07-09 08:09:01 -0700
committerTobias Bosch <tbosch@google.com>2019-07-10 08:20:14 +0000
commitf6d9f4fdcc43f17bdc21420e4bbdf194be420f35 (patch)
treef174be290092fc437f6706f2f3d73883233acc5c /compiler_wrapper/env.go
parent21b943579e2658800753c23b8a0bf2b07b2022e6 (diff)
downloadtoolchain-utils-f6d9f4fdcc43f17bdc21420e4bbdf194be420f35.tar.gz
Support second execution of the compiler with -Wno-error
BUG=chromium:773875 TEST=unit test Change-Id: Ib77fd7c166a13acb733a1dbdfd88129141c4227a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1692969 Reviewed-by: Tobias Bosch <tbosch@google.com> Tested-by: Tobias Bosch <tbosch@google.com>
Diffstat (limited to 'compiler_wrapper/env.go')
-rw-r--r--compiler_wrapper/env.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler_wrapper/env.go b/compiler_wrapper/env.go
index 6cf1a1b9..871648cd 100644
--- a/compiler_wrapper/env.go
+++ b/compiler_wrapper/env.go
@@ -77,10 +77,9 @@ type commandResult struct {
var _ env = (*commandRecordingEnv)(nil)
func (env *commandRecordingEnv) exec(cmd *command) error {
- // Note: We will only get here if the exec failed,
- // e.g. when the underlying command could not be called.
- // In this case, we don't compare commands, so nothing to record.
- return env.exec(cmd)
+ // Note: We treat exec the same as run so that we can do work
+ // after the call.
+ return env.run(cmd, env.stdout(), env.stderr())
}
func (env *commandRecordingEnv) run(cmd *command, stdout io.Writer, stderr io.Writer) error {