]> git.ipfire.org Git - thirdparty/libvirt.git/commit
meson: avoid checking compiler flags twice
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 8 Apr 2021 10:29:20 +0000 (11:29 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 23 Apr 2021 15:12:53 +0000 (16:12 +0100)
commit8f28944fd54b7f3571d73e15953e07b960190416
tree65786bfab75e9153d6fa11832200dfbcd5b046f3
parent8394f08e9d80eb8ab18145afcf1533a69b77eb8a
meson: avoid checking compiler flags twice

In several cases we check if a compiler flag is supported, and then add
it to the 'cc_flags' array. The entire 'cc_flags' array is then later
tested to see if each flag is supported, which duplicates the check in
some cases.

Move the check of cc_flags earlier, and for the extra flags append
directly to supported_cc_flags to avoid the duplicate check

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build