diff options
| author | Stephan Lachnit <stephanlachnit@debian.org> | 2025-10-07 10:43:42 +0200 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-14 09:25:36 -0700 |
| commit | 02c38fef44574d028fbe716cf0f0fd92b18efe2e (patch) | |
| tree | ba4eb85f5ebf30135c6bfd416e625f73ff41817e /mesonbuild | |
| parent | 632115ecff3bd7f9cb519098e04e0467b0cfd3a1 (diff) | |
| download | meson-02c38fef44574d028fbe716cf0f0fd92b18efe2e.tar.gz | |
scanbuild: obey MESON_NUM_PROCESSES environment variable
Diffstat (limited to 'mesonbuild')
| -rw-r--r-- | mesonbuild/scripts/scanbuild.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/scripts/scanbuild.py b/mesonbuild/scripts/scanbuild.py index b738aeee1..24e6924a5 100644 --- a/mesonbuild/scripts/scanbuild.py +++ b/mesonbuild/scripts/scanbuild.py @@ -9,7 +9,7 @@ import tempfile from ..environment import detect_ninja, detect_scanbuild from ..coredata import get_cmd_line_file from ..machinefile import CmdLineFileParser -from ..mesonlib import windows_proof_rmtree +from ..mesonlib import windows_proof_rmtree, determine_worker_count from pathlib import Path import typing as T from ast import literal_eval @@ -20,7 +20,7 @@ def scanbuild(exelist: T.List[str], srcdir: Path, blddir: Path, privdir: Path, l # so it can be debugged. scandir = tempfile.mkdtemp(dir=str(privdir)) meson_cmd = exelist + args - build_cmd = exelist + ['--exclude', str(subprojdir), '-o', str(logdir)] + detect_ninja() + ['-C', scandir] + build_cmd = exelist + ['--exclude', str(subprojdir), '-o', str(logdir)] + detect_ninja() + ['-C', scandir, f'-j{determine_worker_count()}'] rc = subprocess.call(meson_cmd + [str(srcdir), scandir]) if rc != 0: return rc |
