]> xenbits.xensource.com Git - libvirt.git/commit
build: suppress "ignoring duplicate libraries" warning on macOS
authorLaine Stump <laine@redhat.com>
Fri, 3 Nov 2023 17:07:19 +0000 (13:07 -0400)
committerLaine Stump <laine@redhat.com>
Fri, 3 Nov 2023 19:56:37 +0000 (15:56 -0400)
commit9231566146c0614d1339dd94cf98f82f1d1baee2
tree9254dd8f7e0bde1900e05602fabeb4cdfda9782a
parent501825011c1fe80f458820c7efe5a198e0af9be5
build: suppress "ignoring duplicate libraries" warning on macOS

Xcode 15, which provides the compiler toolchain for building libvirt
on macOS has switched to a new linker that warns about duplicated
"-lblah" options on the ld commandline. In practice this is impossible
to prevent in a large project, and also harmless.

Fortunately the new ld command also has an option,
-no_warn_duplicate_libraries, that supresses this harmless/pointless
warning, meson has a simple way to check if that option is supported,
and libvirt's meson.build files already have examples of adding an
option to the ld commandline if it's available.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
meson.build
src/meson.build
tests/meson.build
tools/meson.build