# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/meson/revert-cmdline-limit.patch # Copyright (C) 2024 - 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- meson-1.7.0/mesonbuild/backend/ninjabackend.py.vanilla 2025-01-26 19:49:01.856666662 -0800 +++ meson-1.7.0/mesonbuild/backend/ninjabackend.py 2025-01-26 19:49:05.359999996 -0800 @@ -101,13 +101,10 @@ # and that has a limit of 8k. limit = 8192 else: - # Unix-like OSes usually have very large command line limits, (On Linux, - # for example, this is limited by the kernel's MAX_ARG_STRLEN). However, - # some programs place much lower limits, notably Wine which enforces a - # 32k limit like Windows. Therefore, we limit the command line to 32k. - limit = 32768 - # Be conservative - limit = limit // 2 + # On Linux, ninja always passes the commandline as a single + # big string to /bin/sh, and the kernel limits the size of a + # single argument; see MAX_ARG_STRLEN + limit = 131072 return int(os.environ.get('MESON_RSP_THRESHOLD', limit)) # a conservative estimate of the command-line length limit