For <254 (master), there's a meson option for Valgrind, but it's kind of a mess because it mixes "running under Valgrind" with "Valgrind headers should be used to add annotations". This led to https://github.com/systemd/systemd/commit/50b35193ec6f8f342364742a69a607e967b39b7f in master (not yet in a release, so >=254) which drops the option entirely, making it automagic. We need to avoid it being automagic.
What's the downside to leaving it as automagic?
I guess it's mostly an issue for new systems where you have USE=valgrind in make.conf (and maybe even dev-util/valgrind in world) but systemd gets installed before it (or try to do this on a working system without valgrind already installed). The main situation that I'd say matters is: - have some systemd problem - Try to use it with Valgrind - Get confusing warnings/errors/noise and lack of USE=valgrind makes it seem like there's no annotations available, so you don't look into that side further? (fwiw I think a compromise could be an optfeature for valgrind or something, even if not ideal.)
If the small amount of runtime overhead isn't a major concern for the USE=-valgrind case, maybe we could just wire up the USE flag to pull in dev-util/valgrind.
It's pretty tiny so yes, wfm.