From bc8c1f578f635d870d0f03c0a34750212ac4287e Mon Sep 17 00:00:00 2001 From: Declan Qian Date: Sun, 9 Jan 2022 13:16:12 +0800 Subject: [PATCH] ninja backend: Fix custom_target() console: kwarg when using env When a custom_target() uses an env, meson uses a wrapper script to run the executable. This breaks the console: kwarg because the wrapper script buffers the output. Fix it by setting the verbose flag which will not buffer output. --- mesonbuild/backend/ninjabackend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index b6621c9d8..ed1fe8c7a 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1004,7 +1004,8 @@ class NinjaBackend(backends.Backend): extra_bdeps=target.get_transitive_build_target_deps(), capture=ofilenames[0] if target.capture else None, feed=srcs[0] if target.feed else None, - env=target.env) + env=target.env, + verbose=target.console) if reason: cmd_type = f' (wrapped by meson {reason})' else: