meson: clean up static_library keyword arguments

These are either built because they are dependencies of other targets,
or not needed at all because they are used via extract_objects().
Mark them as "build_by_default: false"; if applicable, mark them
as "fa" so that -Wl,--whole-archive does not interact with the
linker script used for fuzzing.

(The "fa" hack is brittle; updating to Meson 1.1 would allow using
declare_dependency(objects: ...) instead).

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1044
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini
2023-09-27 15:48:31 +02:00
parent f0df613b98
commit 4c545a05ab
3 changed files with 11 additions and 8 deletions

View File

@ -21,12 +21,12 @@ libgdb_user = static_library('gdb_user',
gdb_user_ss.sources() + genh,
name_suffix: 'fa',
c_args: '-DCONFIG_USER_ONLY',
build_by_default: have_user)
build_by_default: false)
libgdb_softmmu = static_library('gdb_softmmu',
gdb_system_ss.sources() + genh,
name_suffix: 'fa',
build_by_default: have_system)
build_by_default: false)
gdb_user = declare_dependency(link_whole: libgdb_user)
user_ss.add(gdb_user)