aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/disable_werror_flag.go
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-07-17 03:23:59 -0700
committerTobias Bosch <tbosch@google.com>2019-07-18 08:23:16 +0000
commit22c32b40be54a9e4062655f90908f98b11e73966 (patch)
treec9cba15f22bafea60a69a676936de944df81290f /compiler_wrapper/disable_werror_flag.go
parent0fc0acdd69e58273ba8987cba9afac2304454561 (diff)
downloadtoolchain-utils-22c32b40be54a9e4062655f90908f98b11e73966.tar.gz
Add json mapping for command and commandResult.
Also exports the fields on these structs so that json can read/write them. BUG=chromium:773875 TEST=unit test Change-Id: I0efead41693dd35548738a0b3a3e5c71c97c319c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1706790 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Tobias Bosch <tbosch@google.com>
Diffstat (limited to 'compiler_wrapper/disable_werror_flag.go')
-rw-r--r--compiler_wrapper/disable_werror_flag.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler_wrapper/disable_werror_flag.go b/compiler_wrapper/disable_werror_flag.go
index 28b257b0..e4037bad 100644
--- a/compiler_wrapper/disable_werror_flag.go
+++ b/compiler_wrapper/disable_werror_flag.go
@@ -31,9 +31,9 @@ func doubleBuildWithWNoError(env env, cfg *config, originalCmd *command) (exitCo
retryStdoutBuffer := &bytes.Buffer{}
retryStderrBuffer := &bytes.Buffer{}
retryCommand := &command{
- path: originalCmd.path,
- args: append(originalCmd.args, "-Wno-error"),
- envUpdates: originalCmd.envUpdates,
+ Path: originalCmd.Path,
+ Args: append(originalCmd.Args, "-Wno-error"),
+ EnvUpdates: originalCmd.EnvUpdates,
}
retryExitCode, err := wrapSubprocessErrorWithSourceLoc(retryCommand,
env.run(retryCommand, retryStdoutBuffer, retryStderrBuffer))
@@ -84,7 +84,7 @@ func doubleBuildWithWNoError(env env, cfg *config, originalCmd *command) (exitCo
jsonData := warningsJSONData{
Cwd: env.getwd(),
- Command: append([]string{originalCmd.path}, originalCmd.args...),
+ Command: append([]string{originalCmd.Path}, originalCmd.Args...),
Stdout: outputToLog,
}
enc := json.NewEncoder(tmpFile)