| Index: buildbot/buildbot_pnacl_toolchain.py | 
| diff --git a/buildbot/buildbot_pnacl_toolchain.py b/buildbot/buildbot_pnacl_toolchain.py | 
| index ae1f7aca3fcd2ed97c351ca426fa0f0079fc346b..010a59d0f9a080381f061e4abaf25a23550d1964 100755 | 
| --- a/buildbot/buildbot_pnacl_toolchain.py | 
| +++ b/buildbot/buildbot_pnacl_toolchain.py | 
| @@ -28,7 +28,8 @@ BUILD_DIR = os.path.join(NACL_DIR, 'build') | 
| PACKAGE_VERSION_DIR = os.path.join(BUILD_DIR, 'package_version') | 
| PACKAGE_VERSION_SCRIPT = os.path.join(PACKAGE_VERSION_DIR, 'package_version.py') | 
|  | 
| -GOMA_PATH = '/b/build/goma' | 
| +GOMA_DEFAULT_PATH = '/b/build/goma' | 
| +GOMA_PATH = os.environ.get('GOMA_DIR', GOMA_DEFAULT_PATH) | 
| GOMA_CTL = os.path.join(GOMA_PATH, 'goma_ctl.py') | 
|  | 
| # As this is a buildbot script, we want verbose logging. Note however, that | 
| @@ -78,6 +79,9 @@ toolchain_install_dir = os.path.join( | 
| use_goma = (buildbot_lib.RunningOnBuildbot() and not args.no_goma | 
| and os.path.isfile(GOMA_CTL)) | 
|  | 
| +# If NOCONTROL_GOMA is set, the script does not start/stop goma compiler_proxy. | 
| +control_goma = use_goma and not os.environ.get('NOCONTROL_GOMA') | 
| + | 
|  | 
| def ToolchainBuildCmd(sync=False, extra_flags=[]): | 
| sync_flag = ['--sync'] if sync else [] | 
| @@ -141,7 +145,7 @@ if host_os != 'win': | 
| os.path.join( | 
| NACL_DIR, '..', 'tools', 'clang', 'scripts', 'update.py')]) | 
|  | 
| -if use_goma: | 
| +if control_goma: | 
| buildbot_lib.Command(context, cmd=[sys.executable, GOMA_CTL, 'restart']) | 
|  | 
| # toolchain_build outputs its own buildbot annotations, so don't use | 
| @@ -155,7 +159,7 @@ if use_goma: | 
| # First build only the packages that will be uploaded, and upload them. | 
| RunWithLog(ToolchainBuildCmd(sync=True, extra_flags=['--canonical-only'])) | 
|  | 
| -if use_goma: | 
| +if control_goma: | 
| buildbot_lib.Command(context, cmd=[sys.executable, GOMA_CTL, 'stop']) | 
|  | 
| if args.skip_tests: | 
|  |