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

Function PrepareBuildDir

deps/v8/tools/dev/update-compile-commands.py:49–64  ·  view source on GitHub ↗
(arch, mode)

Source from the content-addressed store, hash-verified

47 f.write(content)
48
49def PrepareBuildDir(arch, mode):
50 build_dir = os.path.join("out", f"{arch}.{mode}")
51 if not os.path.exists(build_dir):
52 print(f"# mkdir -p {build_dir}")
53 os.makedirs(build_dir)
54 args_gn = os.path.join(build_dir, "args.gn")
55 if not os.path.exists(args_gn):
56 conf = gm.ManagedConfig(arch, mode, [])
57 _Write(args_gn, conf.get_gn_args())
58 build_ninja = os.path.join(build_dir, "build.ninja")
59 if not os.path.exists(build_ninja):
60 code = _Call(f"gn gen {build_dir}")
61 if code != 0: raise Exception("gn gen failed")
62 else:
63 _Call(f"autoninja -C {build_dir} build.ninja")
64 return build_dir
65
66def AddTargetsForArch(arch, combined):
67 build_dir = PrepareBuildDir(arch, "debug")

Callers 2

AddTargetsForArchFunction · 0.85
CompileLanguageServerFunction · 0.85

Calls 6

get_gn_argsMethod · 0.95
_WriteFunction · 0.85
_CallFunction · 0.70
printFunction · 0.50
joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected