infra: enable strip flag only when it's requeted.

$meson . build -Dstrip=false  //off
$meson . build -Dstrip=true   //on
This commit is contained in:
Hermet Park 2023-05-16 19:14:57 +09:00 committed by Hermet Park
parent 1672badb7c
commit 42e0f8c3a3
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
project('thorvg',
'cpp',
default_options : ['buildtype=debugoptimized', 'b_sanitize=none', 'werror=false', 'optimization=s', 'cpp_std=c++14'],
default_options : ['buildtype=debugoptimized', 'b_sanitize=none', 'werror=false', 'optimization=s', 'cpp_std=c++14', 'strip=true'],
version : '0.9.99',
license : 'MIT')

View file

@ -30,7 +30,7 @@ elif (cc.get_id() != 'msvc')
compiler_flags += ['-mfpu=neon']
endif
if get_option('b_sanitize') == 'none'
compiler_flags += ['-s', '-fno-exceptions', '-fno-rtti', '-fno-stack-protector', '-fno-math-errno',
compiler_flags += ['-fno-exceptions', '-fno-rtti', '-fno-stack-protector', '-fno-math-errno',
'-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
'-Woverloaded-virtual', '-Wno-unused-parameter']
endif