clang treats invalid -W options as warnings so all -W checks succeed with it. The result is: ^[[0;1;35mwarning: ^[[0m^[[1munknown warning option '-Wlogical-op' [-Wunknown-warning-option]^[[0m for each file. I suggest improving the test by either: 1) checking compiler output as well -- if compiler does not output any messages (warnings) then the option is supported, 2) check for -Werror first and then append it for other checks.
I am pretty sure that this is something to fix in clang, not systemd.
Closing, since I beliebe this should be fixed in clang, not systemd.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.