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.
pull/10112/head
Declan Qian 3 years ago committed by Nirbheek Chauhan
parent b467a7e0c2
commit 7b31505304
  1. 3
      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:

Loading…
Cancel
Save