meson: Trim unreferenced functions, data

This commit is contained in:
Matt Borgerson 2025-03-06 02:39:24 -07:00
parent fdb78c5dbd
commit 1777ac72a7
1 changed files with 4 additions and 0 deletions

View File

@ -353,6 +353,10 @@ qemu_common_flags = [
qemu_cflags = []
qemu_ldflags = []
# Trim unreferenced functions, data
qemu_common_flags += ['-ffunction-sections', '-fdata-sections']
qemu_ldflags += '-Wl,--gc-sections'
if host_os == 'darwin'
# Disable attempts to use ObjectiveC features in os/object.h since they
# won't work when we're compiling with gcc as a C compiler.