Meta: Invoke ninja directly instead of cmake --build

This shaves about 10ms off an invocation of `ladybird.py build` on my
machine, going from ~180ms to ~170ms.
This commit is contained in:
Timothy Flynn 2025-05-30 09:18:35 -04:00 committed by Tim Flynn
commit 16743ee9d9
Notes: github-actions[bot] 2025-05-30 16:55:33 +00:00

View file

@ -310,14 +310,15 @@ def ensure_ladybird_source_dir() -> Path:
def build_main(build_dir: Path, target: Optional[str] = None, args: list[str] = []): def build_main(build_dir: Path, target: Optional[str] = None, args: list[str] = []):
build_args = [ build_args = [
"cmake", "ninja",
"--build", "-C",
str(build_dir), str(build_dir),
"--parallel", "-j",
os.environ.get("MAKEJOBS", str(multiprocessing.cpu_count())), os.environ.get("MAKEJOBS", str(multiprocessing.cpu_count())),
] ]
if target: if target:
build_args.extend(["--target", target]) build_args.append(target)
if args: if args:
build_args.append("--") build_args.append("--")