compiler_wrapper: add --rewrapper-path support

This CL adds --rewrapper-path support to the compiler, as requested in
the linked bug. The use of this is mutually exclusive with that of

We currently look for either a `--gomacc-path` flag or a `GOMACC_PATH`
env var to enable goma. If any rewrapper flag is specified, this
disables our checking of `GOMACC_PATH` for the purposes of mutual
exclusivity checking.

TEST=go test, a few manual invocations

Change-Id: I03dd2835a313806a9700c49c47c82fecf19a4b7f
Reviewed-by: Ryan Beltran <>
Tested-by: George Burgess <>
4 files changed