Commit 942a1eef authored by Brandon DeRosier's avatar Brandon DeRosier Committed by LUCI CQ

Respect GOMA_DIR in autoninja instead of always assuming .cipd_bin.

Chromium + Fuchsia + Flutter Engine tools use GOMA_DIR to determine the
location of goma's scripts and binaries. Goma installs track some state
separately, and so when a different goma distribution's `compiler_proxy`
is launched and autoninja attempts to run `.cipd_bin/gomacc port`, the
check fails even though goma is running.

Additional context:
https://github.com/flutter/flutter/issues/81510#issuecomment-839489061
Change-Id: I93775628c6efba62bb226ac1995301c3ae7f5fa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2891250Reviewed-by: 's avatarFumitoshi Ukai <ukai@google.com>
Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Brandon DeRosier <bdero@google.com>
parent 04cf3de9
......@@ -121,7 +121,8 @@ if offline or goma_disabled_env in ['true', 't', 'yes', 'y', '1']:
if use_goma:
gomacc_file = 'gomacc.exe' if sys.platform.startswith('win') else 'gomacc'
gomacc_path = os.path.join(SCRIPT_DIR, '.cipd_bin', gomacc_file)
goma_dir = os.environ.get('GOMA_DIR', os.path.join(SCRIPT_DIR, '.cipd_bin'))
gomacc_path = os.path.join(goma_dir, gomacc_file)
# Don't invoke gomacc if it doesn't exist.
if os.path.exists(gomacc_path):
# Check to make sure that goma is running. If not, don't start the build.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment