From 7dc52c6b410f5b0e16cbdf6b2e4071ff9d8408cd Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Thu, 30 May 2019 13:40:57 +0900 Subject: [PATCH] rlottie: Optimize library size by disabling exception table generation (.eh_frame section) --- CMakeLists.txt | 2 ++ meson.build | 1 + 2 files changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 117c69958b..1013095210 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,8 @@ target_compile_options(rlottie -std=c++14 -O2 -fno-exceptions + -fno-unwind-tables + -fno-asynchronous-unwind-tables -fno-rtti -Wall -Werror diff --git a/meson.build b/meson.build index 9ecb8d298f..5d4cfe3607 100644 --- a/meson.build +++ b/meson.build @@ -7,6 +7,7 @@ rlottie_lib_version = '0.0.1' add_global_arguments('-DDEMO_DIR="@0@/example/resource/"'.format(meson.current_source_dir()), language : 'cpp') compiler_flags = ['-std=c++14', '-O2', '-Wall', '-Werror', '-Wextra', '-fno-exceptions', '-fno-rtti', + '-fno-unwind-tables' , '-fno-asynchronous-unwind-tables', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '-Wno-unused-parameter', '-fvisibility=hidden'] if get_option('asan') == true