From 2dca9703cf433885c352bc01fb86f8174fdb3672 Mon Sep 17 00:00:00 2001 From: Subhransu Mohanty Date: Fri, 21 Aug 2020 16:53:56 +0900 Subject: [PATCH] meson: added compiler flags to optimize binary size this reduced library size from 153KB to 119KB. Change-Id: Ie70e5412b42d864fbaa827eec21b3cbc1e8f26af --- src/meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/meson.build b/src/meson.build index 40d85ce..1fb8989 100644 --- a/src/meson.build +++ b/src/meson.build @@ -6,6 +6,9 @@ if (cc.get_id() != 'msvc') compiler_flags += ['-mavx'] message('Enable Advanced Vector Extension') endif + compiler_flags += ['-fno-exceptions', '-fno-rtti', + '-fno-unwind-tables' , '-fno-asynchronous-unwind-tables', + '-Woverloaded-virtual', '-Wno-unused-parameter'] endif -- 2.7.4