Skip to content

Commit 6c5a6c0

Browse files
Takuto IkutaV8 LUCI CQ
authored andcommitted
remove references to goma
goma is not supported anymore. Bug: 41489832 Change-Id: I93ab073a1ac6987fb00059df1bb68dba24468af1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5541431 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Alexander Schulze <alexschulze@chromium.org> Commit-Queue: Takuto Ikuta <tikuta@chromium.org> Auto-Submit: Takuto Ikuta <tikuta@chromium.org> Cr-Commit-Position: refs/heads/main@{#93921}
1 parent e91e4d0 commit 6c5a6c0

8 files changed

Lines changed: 78 additions & 202 deletions

File tree

infra/mb/mb_config.pyl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
'V8 Linux - verify csa - builder': 'release_x86_verify_csa',
6767
# Linux64.
6868
'V8 Linux64 - builder': 'release_x64_gcmole',
69-
'V8 Linux64 - builder (goma cache silo)': 'release_x64',
7069
'V8 Linux64 - builder (reclient)': 'release_x64_reclient',
7170
'V8 Linux64 - builder (reclient compare)': 'release_x64_reclient',
7271
'V8 Linux64 - official - builder': 'official_x64_on_release_branch',
@@ -84,7 +83,6 @@
8483
# Windows.
8584
'V8 Win - arm64 - debug builder': 'debug_arm64',
8685
'V8 Win32 - builder': 'release_x86_minimal_symbols',
87-
'V8 Win32 - builder (goma cache silo)': 'release_x86',
8886
'V8 Win32 - builder (reclient)': 'release_x86_minimal_symbols_reclient',
8987
'V8 Win32 - builder (reclient compare)': 'release_x86_minimal_symbols_reclient',
9088
'V8 Win32 - debug builder': 'debug_x86_minimal_symbols',
@@ -726,8 +724,6 @@
726724
'debug', 'x86', 'reclient', 'v8_enable_slow_dchecks', 'v8_full_debug'],
727725

728726
# Release configs for x86.
729-
'release_x86': [
730-
'release_bot', 'x86'],
731727
'release_x86_asan_symbolized_verify_heap': [
732728
'release_bot', 'x86', 'asan', 'lsan', 'symbolized',
733729
'v8_verify_heap'],

tools/builtins-pgo/generate.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,6 @@ def run(cmd, **kwargs):
5050
return subprocess.run(cmd, **kwargs, check=True)
5151

5252

53-
def try_start_goma():
54-
res = run(["goma_ctl", "ensure_start"])
55-
print(res.returncode)
56-
has_goma = res.returncode == 0
57-
print("Detected Goma:", has_goma)
58-
return has_goma
59-
60-
61-
6253
def build_d8(path, gn_args):
6354
if not path.exists():
6455
path.mkdir(parents=True, exist_ok=True)
@@ -76,7 +67,6 @@ def build_d8(path, gn_args):
7667
print(f"Invalid benchmark argument: {args.benchmark_path}")
7768
exit(1)
7869

79-
has_goma_str = "true" if try_start_goma() else "false"
8070
cmd_prefix = []
8171
if args.use_qemu:
8272
if args.v8_target_cpu == "arm":
@@ -92,7 +82,6 @@ def build_d8(path, gn_args):
9282
is_clang = true
9383
target_cpu = "{args.target_cpu}"
9484
v8_target_cpu = "{args.v8_target_cpu}"
95-
use_goma = {has_goma_str}
9685
v8_enable_builtins_profiling = true
9786
"""
9887

@@ -102,7 +91,6 @@ def build_d8(path, gn_args):
10291
use_custom_libcxx = false
10392
target_cpu = "{args.target_cpu}"
10493
v8_target_cpu = "{args.v8_target_cpu}"
105-
use_goma = false
10694
v8_enable_builtins_profiling = true
10795
"""
10896

tools/dev/gm.py

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Convenience wrapper for compiling V8 with gn/ninja and running tests.
77
Sets up build output directories if they don't exist.
88
Produces simulator builds for non-Intel target architectures.
9-
Uses Goma by default if it is detected (at output directory setup time).
9+
Uses reclient by default if it is detected (at output directory setup time).
1010
Expects to be run from the root of a V8 checkout.
1111
1212
Usage:
@@ -155,7 +155,7 @@
155155
GCLIENT_FILE_PATH = V8_DIR.parent / ".gclient"
156156
RECLIENT_CERT_CACHE = V8_DIR / ".#gm_reclient_cert_cache"
157157

158-
BUILD_DISTRIBUTION_RE = re.compile(r"\nuse_(remoteexec|goma) = (false|true)")
158+
BUILD_DISTRIBUTION_RE = re.compile(r"\nuse_remoteexec = (false|true)")
159159
RECLIENT_CFG_RE = re.compile(r"\nrbe_cfg_dir = \"[^\"]+\"")
160160

161161
class Reclient(IntEnum):
@@ -221,34 +221,7 @@ def detect_reclient_cert():
221221
return True
222222

223223

224-
# Deprecated.
225-
def detect_goma():
226-
if os.environ.get("GOMA_DIR"):
227-
return Path(os.environ.get("GOMA_DIR"))
228-
if os.environ.get("GOMADIR"):
229-
return Path(os.environ.get("GOMADIR"))
230-
# There is a copy of goma in depot_tools, but it might not be in use on
231-
# this machine.
232-
goma = shutil.which("goma_ctl")
233-
if goma is None: return None
234-
cipd_bin = Path(goma).parent / ".cipd_bin"
235-
if not cipd_bin.exists():
236-
return None
237-
# Some machines have one of these files, some have the other, some have both.
238-
goma_auth = Path("~/.goma_client_oauth2_config").expanduser()
239-
if goma_auth.exists():
240-
return cipd_bin
241-
goma_auth = Path("~/.goma_oauth2_config").expanduser()
242-
if goma_auth.exists():
243-
return cipd_bin
244-
return None
245-
246-
247224
RECLIENT_MODE = detect_reclient()
248-
GOMADIR = detect_goma()
249-
250-
# Let reclient have precedence over goma.
251-
IS_GOMA_MACHINE = not RECLIENT_MODE and GOMADIR is not None
252225

253226
if platform.system() == "Linux":
254227
RECLIENT_CFG_REL = "../../buildtools/reclient_cfgs/linux"
@@ -260,8 +233,6 @@ def detect_goma():
260233
BUILD_DISTRIBUTION_LINE = "\nuse_remoteexec = true"
261234
if RECLIENT_MODE == Reclient.CUSTOM:
262235
BUILD_DISTRIBUTION_LINE += f"\nrbe_cfg_dir = \"{RECLIENT_CFG_REL}\""
263-
elif IS_GOMA_MACHINE:
264-
BUILD_DISTRIBUTION_LINE = "\nuse_goma = true"
265236

266237
RELEASE_ARGS_TEMPLATE = f"""\
267238
is_component_build = false
@@ -785,12 +756,6 @@ def main(argv):
785756
parser = ArgumentParser()
786757
configs = parser.parse_arguments(argv[1:])
787758
return_code = 0
788-
# If we have Goma but it is not running, start it.
789-
is_goma_running_cmd = "tasklist | FIND \"compiler_proxy.exe\" > nul" if \
790-
sys.platform == "win32" else "pgrep -x compiler_proxy > /dev/null"
791-
if (IS_GOMA_MACHINE and _call(is_goma_running_cmd, silent=True) != 0):
792-
goma_ctl = GOMADIR / "goma_ctl.py"
793-
_call(f"{sys.executable} {goma_ctl} ensure_start")
794759
# If we have Reclient with the Google configuration, check for current
795760
# certificate.
796761
if (RECLIENT_MODE == Reclient.GOOGLE and not detect_reclient_cert()):

tools/dev/v8gen.py

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
"""Script to generate V8's gn arguments based on common developer defaults
77
or builder configurations.
88
9-
Goma is used by default if detected. The compiler proxy is assumed to run.
10-
119
This script can be added to the PATH and be used on other checkouts. It always
1210
runs for the checkout nesting the CWD.
1311
@@ -22,14 +20,13 @@
2220
# Generate the ia32.release config in out.gn/ia32.release.
2321
v8gen.py ia32.release
2422
25-
# Generate into out.gn/foo without goma auto-detect.
26-
v8gen.py gen -b ia32.release foo --no-goma
23+
# Generate into out.gn/foo.
24+
v8gen.py gen -b ia32.release foo
2725
2826
# Pass additional gn arguments after -- (don't use spaces within gn args).
2927
v8gen.py ia32.optdebug -- v8_enable_slow_dchecks=true
3028
31-
# Generate gn arguments of 'V8 Linux64 - builder' from 'client.v8'. To switch
32-
# off goma usage here, the args.gn file must be edited manually.
29+
# Generate gn arguments of 'V8 Linux64 - builder' from 'client.v8'.
3330
v8gen.py -m client.v8 -b 'V8 Linux64 - builder'
3431
3532
# Show available configurations.
@@ -48,7 +45,6 @@
4845
import sys
4946

5047
CONFIG = os.path.join('infra', 'mb', 'mb_config.pyl')
51-
GOMA_DEFAULT = os.path.join(os.path.expanduser("~"), 'goma')
5248
OUT_DIR = 'out.gn'
5349

5450
TOOLS_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -103,17 +99,6 @@ def add_common_options(p):
10399
'-p', '--pedantic', action='store_true',
104100
help='run gn over command-line gn args to catch errors early')
105101

106-
goma = gen_cmd.add_mutually_exclusive_group()
107-
goma.add_argument(
108-
'-g' , '--goma',
109-
action='store_true', default=None, dest='goma',
110-
help='force using goma')
111-
goma.add_argument(
112-
'--nogoma', '--no-goma',
113-
action='store_false', default=None, dest='goma',
114-
help='don\'t use goma auto detection - goma might still be used if '
115-
'specified as a gn arg')
116-
117102
# Command: list.
118103
list_cmd = subps.add_parser(
119104
'list', help='list available configurations')
@@ -176,13 +161,6 @@ def cmd_gen(self):
176161
modified = self._append_gn_args(
177162
'command-line', gn_args_path, '\n'.join(self._gn_args))
178163

179-
# Append goma args.
180-
# TODO(machenbach): We currently can't remove existing goma args from the
181-
# original config. E.g. to build like a bot that uses goma, but switch
182-
# goma off.
183-
modified |= self._append_gn_args(
184-
'goma', gn_args_path, self._goma_args)
185-
186164
# Regenerate ninja files to check for errors in the additional gn args.
187165
if modified and self._options.pedantic:
188166
self._call_cmd(['gn', 'gen', gn_outdir])
@@ -229,37 +207,6 @@ def _find_work_dir(self, path):
229207
else:
230208
return self._find_work_dir(os.path.dirname(path))
231209

232-
@property
233-
def _goma_dir(self):
234-
return os.path.normpath(os.environ.get('GOMA_DIR') or GOMA_DEFAULT)
235-
236-
@property
237-
def _need_goma_dir(self):
238-
return self._goma_dir != GOMA_DEFAULT
239-
240-
@property
241-
def _use_goma(self):
242-
if self._options.goma is None:
243-
# Auto-detect.
244-
return os.path.exists(self._goma_dir) and os.path.isdir(self._goma_dir)
245-
else:
246-
return self._options.goma
247-
248-
@property
249-
def _goma_args(self):
250-
"""Gn args for using goma."""
251-
# Specify goma args if we want to use goma and if goma isn't specified
252-
# via command line already. The command-line always has precedence over
253-
# any other specification.
254-
if (self._use_goma and
255-
not any(re.match(r'use_goma\s*=.*', x) for x in self._gn_args)):
256-
if self._need_goma_dir:
257-
return 'use_goma=true\ngoma_dir="%s"' % self._goma_dir
258-
else:
259-
return 'use_goma=true'
260-
else:
261-
return ''
262-
263210
def _append_gn_args(self, type, gn_args_path, more_gn_args):
264211
"""Append extra gn arguments to the generated args.gn file."""
265212
if not more_gn_args:

tools/mb/docs/user_guide.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ a single object with the following fields:
4343
no tests that will be run.
4444
* `additional_compile_targets`: an array of (ninja) build targets that
4545
reflect the stuff we might want to build *in addition to* the list
46-
passed in `test_targets`. Targets in this list will be treated
46+
passed in `test_targets`. Targets in this list will be treated
4747
specially, in the following way: if a given target is a "meta"
4848
(GN: group, GYP: none) target like 'blink_tests' or or even the
4949
ninja-specific 'all' target, then only the *dependencies* of the
@@ -65,7 +65,7 @@ fields:
6565
* `compile_targets`: the list of ninja targets that should be passed
6666
directly to the corresponding ninja / compile.py invocation. This
6767
list may contain entries that are *not* listed in the input (see
68-
the description of `additional_compile_targets` above and
68+
the description of `additional_compile_targets` above and
6969
[design_spec.md](the design spec) for how this works).
7070
* `invalid_targets`: a list of any targets that were passed in
7171
either of the input lists that weren't actually found in the graph.
@@ -131,10 +131,6 @@ You can pass the `-q/--quiet` flag to get mb to be silent unless there is an
131131
error, and pass the `-v/--verbose` flag to get mb to log all of the files
132132
that are read and written, and all the commands that are run.
133133

134-
If the build config will use the Goma distributed-build system, you can pass
135-
the path to your Goma client in the `-g/--goma-dir` flag, and it will be
136-
incorporated into the appropriate flags for GYP or GN as needed.
137-
138134
If gen ends up using GYP, the path must have a valid GYP configuration as the
139135
last component of the path (i.e., specify `//out/Release_x64`, not `//out`).
140136
The gyp script defaults to `//build/gyp_chromium`, but can be overridden with
@@ -262,8 +258,8 @@ For example, if you had:
262258
}
263259
'mixins': {
264260
'bot': {
265-
'gyp_defines': 'use_goma=1 dcheck_always_on=0',
266-
'gn_args': 'use_goma=true dcheck_always_on=false',
261+
'gyp_defines': 'use_remoteexec=1 dcheck_always_on=0',
262+
'gn_args': 'use_remoteexec=true dcheck_always_on=false',
267263
},
268264
'debug': {
269265
'gn_args': 'is_debug=true',
@@ -290,7 +286,7 @@ For example, if you had:
290286

291287
and you ran `mb gen -c linux_release_trybot //out/Release`, it would
292288
translate into a call to `gyp_chromium -G Release` with `GYP_DEFINES` set to
293-
`"use_goma=true dcheck_always_on=false dcheck_always_on=true"`.
289+
`"use_remoteexec=true dcheck_always_on=false dcheck_always_on=true"`.
294290

295291
(From that you can see that mb is intentionally dumb and does not
296292
attempt to de-dup the flags, it lets gyp do that).
@@ -308,5 +304,3 @@ If you hit weirder things than that, add some print statements to the
308304
python script, send a question to gn-dev@chromium.org, or
309305
[file a bug](https://crbug.com/new) with the label
310306
'mb' and cc: dpranke@chromium.org.
311-
312-

tools/mb/mb.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,18 @@ def AddCommonOptions(subp):
127127
default=self.default_config,
128128
help='path to config file '
129129
'(default is %(default)s)')
130-
subp.add_argument('-i', '--isolate-map-file', metavar='PATH',
131-
help='path to isolate map file '
132-
'(default is %(default)s)',
133-
default=[],
134-
action='append',
135-
dest='isolate_map_files')
136-
subp.add_argument('-g', '--goma-dir',
137-
help='path to goma directory')
138-
subp.add_argument('--android-version-code',
139-
help='Sets GN arg android_default_version_code')
130+
subp.add_argument(
131+
'-i',
132+
'--isolate-map-file',
133+
metavar='PATH',
134+
help='path to isolate map file '
135+
'(default is %(default)s)',
136+
default=[],
137+
action='append',
138+
dest='isolate_map_files')
139+
subp.add_argument(
140+
'--android-version-code',
141+
help='Sets GN arg android_default_version_code')
140142
subp.add_argument('--android-version-name',
141143
help='Sets GN arg android_default_version_name')
142144
subp.add_argument('-n', '--dryrun', action='store_true',
@@ -167,11 +169,12 @@ def AddCommonOptions(subp):
167169
subp = subps.add_parser('export',
168170
help='print out the expanded configuration for'
169171
'each builder as a JSON object')
170-
subp.add_argument('-f', '--config-file', metavar='PATH',
171-
default=self.default_config,
172-
help='path to config file (default is %(default)s)')
173-
subp.add_argument('-g', '--goma-dir',
174-
help='path to goma directory')
172+
subp.add_argument(
173+
'-f',
174+
'--config-file',
175+
metavar='PATH',
176+
default=self.default_config,
177+
help='path to config file (default is %(default)s)')
175178
subp.set_defaults(func=self.CmdExport)
176179

177180
subp = subps.add_parser('gen',
@@ -657,9 +660,9 @@ def FlattenMixins(self, mixins, vals, visited):
657660
vals['cros_passthrough'] = mixin_vals['cros_passthrough']
658661
if 'args_file' in mixin_vals:
659662
if vals['args_file']:
660-
raise MBErr('args_file specified multiple times in mixins '
661-
'for %s on %s' %
662-
(self.args.builder, self.args.builder_group))
663+
raise MBErr('args_file specified multiple times in mixins '
664+
'for %s on %s' %
665+
(self.args.builder, self.args.builder_group))
663666
vals['args_file'] = mixin_vals['args_file']
664667
if 'gn_args' in mixin_vals:
665668
if vals['gn_args']:
@@ -701,21 +704,21 @@ def RunGNGen(self, vals, compute_grit_inputs_for_analyze=False):
701704
isolate_map = self.ReadIsolateMap()
702705
err, labels = self.MapTargetsToLabels(isolate_map, swarming_targets)
703706
if err:
704-
raise MBErr(err)
707+
raise MBErr(err)
705708

706709
gn_runtime_deps_path = self.ToAbsPath(build_dir, 'runtime_deps')
707710
self.WriteFile(gn_runtime_deps_path, '\n'.join(labels) + '\n')
708711
cmd.append('--runtime-deps-list-file=%s' % gn_runtime_deps_path)
709712

710713
ret, output, _ = self.Run(cmd)
711714
if ret:
712-
if self.args.json_output:
713-
# write errors to json.output
714-
self.WriteJSON({'output': output}, self.args.json_output)
715-
# If `gn gen` failed, we should exit early rather than trying to
716-
# generate isolates. Run() will have already logged any error output.
717-
self.Print('GN gen failed: %d' % ret)
718-
return ret
715+
if self.args.json_output:
716+
# write errors to json.output
717+
self.WriteJSON({'output': output}, self.args.json_output)
718+
# If `gn gen` failed, we should exit early rather than trying to
719+
# generate isolates. Run() will have already logged any error output.
720+
self.Print('GN gen failed: %d' % ret)
721+
return ret
719722

720723
android = 'target_os="android"' in vals['gn_args']
721724
for target in swarming_targets:
@@ -861,9 +864,6 @@ def GNArgs(self, vals, expand_imports=False):
861864
else:
862865
gn_args = vals['gn_args']
863866

864-
if self.args.goma_dir:
865-
gn_args += ' goma_dir="%s"' % self.args.goma_dir
866-
867867
android_version_code = self.args.android_version_code
868868
if android_version_code:
869869
gn_args += ' android_default_version_code="%s"' % android_version_code

0 commit comments

Comments
 (0)