qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] meson.build: add -gsplit-dwarf to default cflags
@ 2025-03-03 22:17 Alex Bennée
  2025-03-04 10:19 ` Daniel P. Berrangé
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Bennée @ 2025-03-03 22:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Paolo Bonzini, Marc-André Lureau,
	Daniel P. Berrangé, Philippe Mathieu-Daudé

This option is supported by both gcc (since 4.7) and clang (since
7.0). Not only does this make the linkers job easier by reducing the
amount of ELF it needs to parse it also reduces the total build size
quite considerably. In my case a default build went from 5.8G to 3.9G.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
RFC:
  - currently and RFC because it should also apply to test binaries
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 4588bfd864..a936d1b422 100644
--- a/meson.build
+++ b/meson.build
@@ -363,7 +363,7 @@ endforeach
 
 qemu_common_flags = [
   '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE',
-  '-fno-strict-aliasing', '-fno-common', '-fwrapv' ]
+  '-fno-strict-aliasing', '-fno-common', '-fwrapv', '-gsplit-dwarf' ]
 qemu_cflags = []
 qemu_ldflags = []
 
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-04 13:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-03 22:17 [RFC PATCH] meson.build: add -gsplit-dwarf to default cflags Alex Bennée
2025-03-04 10:19 ` Daniel P. Berrangé
2025-03-04 11:33   ` Alex Bennée
2025-03-04 11:38     ` Daniel P. Berrangé
2025-03-04 12:11     ` Daniel P. Berrangé
2025-03-04 13:20       ` Daniel P. Berrangé
2025-03-04 13:47         ` Alex Bennée
2025-03-04 13:40       ` Philippe Mathieu-Daudé
2025-03-04 13:43         ` Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).