infra: update the compiler options

- applying robust build options
- aligning options between gcc/clang compilers.
This commit is contained in:
Hermet Park 2024-05-07 01:16:56 +09:00 committed by Hermet Park
parent 477714778c
commit 4370fc7fb3

View file

@ -19,8 +19,9 @@ if (cc.get_id() == 'clang-cl')
endif endif
if get_option('b_sanitize') == 'none' if get_option('b_sanitize') == 'none'
override_options += ['cpp_eh=none','cpp_rtti=false'] override_options += ['cpp_eh=none','cpp_rtti=false']
compiler_flags += ['/clang:-fno-math-errno', compiler_flags += ['/clang:-fno-math-errno', '/clang:-Woverloaded-virtual',
'/clang:-Woverloaded-virtual', '/clang:-Wno-unused-value', '-Wno-deprecated-declarations'] '/clang:-fno-stack-protector', '/clang:-fno-unwind-tables' ,
'/clang:-fno-asynchronous-unwind-tables']
endif endif
elif (cc.get_id() != 'msvc') elif (cc.get_id() != 'msvc')
if simd_type == 'avx' if simd_type == 'avx'
@ -32,7 +33,7 @@ elif (cc.get_id() != 'msvc')
if get_option('b_sanitize') == 'none' if get_option('b_sanitize') == 'none'
compiler_flags += ['-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', '-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
'-Woverloaded-virtual', '-Wno-unused-parameter'] '-Woverloaded-virtual']
endif endif
endif endif