MCPcopy Create free account
hub / github.com/nodejs/node / update_build_distribution_args

Method update_build_distribution_args

deps/v8/tools/dev/gm.py:440–454  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

438 self.clean |= clean
439
440 def update_build_distribution_args(self):
441 args_gn = self.path / "args.gn"
442 assert args_gn.exists(), f"args.gn does not exist: {args_gn}"
443 gn_args = args_gn.read_text()
444 # Remove custom reclient config path (it will be added again as part of
445 # the config line below if needed).
446 new_gn_args = DEPRECATED_RBE_CFG_RE.sub("", gn_args)
447 new_gn_args = RECLIENT_CFG_RE.sub("", new_gn_args)
448 new_gn_args = BUILD_DISTRIBUTION_RE.sub(BUILD_DISTRIBUTION_LINE,
449 new_gn_args)
450 # Remove stale goma_dir to silence GN warnings about unused options.
451 new_gn_args = GOMA_DIR_LINE.sub("", new_gn_args)
452 if gn_args != new_gn_args:
453 print(f"# Updated gn args:{BUILD_DISTRIBUTION_LINE}")
454 _write(args_gn, new_gn_args, log=False)
455
456 def build(self):
457 self.update_build_distribution_args()

Callers 1

buildMethod · 0.95

Calls 3

_writeFunction · 0.70
printFunction · 0.50
existsMethod · 0.45

Tested by

no test coverage detected