Commit b2c18f2f authored by Vitaly Buka's avatar Vitaly Buka Committed by LUCI CQ

Support CMake generated build files

Chromium does not use CMake, however ninja with Goma is used by LLVM
team.

Change-Id: I38349d0574048b22b32365e45c587e604e045442
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2572805Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
parent ca45aff3
......@@ -87,12 +87,18 @@ if os.path.exists(os.path.join(output_dir, 'args.gn')):
line_without_comment):
use_remote_build = True
continue
elif os.path.exists(os.path.join(output_dir, 'rules.ninja')):
with open(os.path.join(output_dir, 'rules.ninja')) as file_handle:
for line in file_handle:
if re.match(r'^\s*command\s*=\s*\S+gomacc', line):
use_remote_build = True
break
else:
for relative_path in [
'', # GN keeps them in the root of output_dir
'CMakeFiles'
]:
path = os.path.join(output_dir, relative_path, 'rules.ninja')
if os.path.exists(path):
with open(path) as file_handle:
for line in file_handle:
if re.match(r'^\s*command\s*=\s*\S+gomacc', line):
use_remote_build = True
break
# If GOMA_DISABLED is set to "true", "t", "yes", "y", or "1" (case-insensitive)
# then gomacc will use the local compiler instead of doing a goma compile. This
......
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