mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 10:53:37 +08:00
4408155ac5
The non-standard .fa library suffix breaks the link source
de-duplication done by Meson so drop it.
The lack of link source de-duplication causes AddressSanitizer to
complain ODR violations, and makes GNU ld abort when combined with
clang's LTO.
Fortunately, the non-standard suffix is not necessary anymore for
two reasons.
First, the non-standard suffix was necessary for fork-fuzzing.
Meson wraps all standard-suffixed libraries with --start-group and
--end-group. This made a fork-fuzz.ld linker script wrapped as well and
broke builds. Commit d2e6f9272d
("fuzz: remove fork-fuzzing
scaffolding") dropped fork-fuzzing so we can now restore the standard
suffix.
Second, the libraries are not even built anymore, because it is
possible to just use the object files directly via extract_all_objects().
The occurences of the suffix were detected and removed by performing
a tree-wide search with 'fa' and .fa (note the quotes and dot).
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20240524-xkb-v4-4-2de564e5c859@daynix.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
51 lines
1.5 KiB
Meson
51 lines
1.5 KiB
Meson
if not get_option('tcg').allowed()
|
|
subdir_done()
|
|
endif
|
|
|
|
tcg_ss = ss.source_set()
|
|
|
|
tcg_ss.add(files(
|
|
'optimize.c',
|
|
'region.c',
|
|
'tcg.c',
|
|
'tcg-common.c',
|
|
'tcg-op.c',
|
|
'tcg-op-ldst.c',
|
|
'tcg-op-gvec.c',
|
|
'tcg-op-vec.c',
|
|
))
|
|
|
|
if get_option('tcg_interpreter')
|
|
libffi = dependency('libffi', version: '>=3.0', required: true,
|
|
method: 'pkg-config')
|
|
tcg_ss.add(libffi)
|
|
tcg_ss.add(files('tci.c'))
|
|
endif
|
|
|
|
tcg_ss.add(when: libdw, if_true: files('debuginfo.c'))
|
|
if host_os == 'linux'
|
|
tcg_ss.add(files('perf.c'))
|
|
endif
|
|
|
|
tcg_ss = tcg_ss.apply({})
|
|
|
|
libtcg_user = static_library('tcg_user',
|
|
tcg_ss.sources() + genh,
|
|
dependencies: tcg_ss.dependencies(),
|
|
c_args: '-DCONFIG_USER_ONLY',
|
|
build_by_default: false)
|
|
|
|
tcg_user = declare_dependency(objects: libtcg_user.extract_all_objects(recursive: false),
|
|
dependencies: tcg_ss.dependencies())
|
|
user_ss.add(tcg_user)
|
|
|
|
libtcg_system = static_library('tcg_system',
|
|
tcg_ss.sources() + genh,
|
|
dependencies: tcg_ss.dependencies(),
|
|
c_args: '-DCONFIG_SOFTMMU',
|
|
build_by_default: false)
|
|
|
|
tcg_system = declare_dependency(objects: libtcg_system.extract_all_objects(recursive: false),
|
|
dependencies: tcg_ss.dependencies())
|
|
system_ss.add(tcg_system)
|