mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
infra: added double-precison promotion warning
Note that, for our dev-convenient, this option is only toggled on when the logging is off. Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
This commit is contained in:
parent
c22af13027
commit
29b612237d
2 changed files with 15 additions and 2 deletions
|
@ -57,6 +57,9 @@ webp_loader = all_loaders or get_option('loaders').contains('webp')
|
||||||
all_savers = get_option('savers').contains('all')
|
all_savers = get_option('savers').contains('all')
|
||||||
gif_saver = all_savers or get_option('savers').contains('gif') or lottie2gif
|
gif_saver = all_savers or get_option('savers').contains('gif') or lottie2gif
|
||||||
|
|
||||||
|
#logging
|
||||||
|
logging = get_option('log')
|
||||||
|
|
||||||
#Loaders/savers/tools config
|
#Loaders/savers/tools config
|
||||||
if svg_loader
|
if svg_loader
|
||||||
config_h.set10('THORVG_SVG_LOADER_SUPPORT', true)
|
config_h.set10('THORVG_SVG_LOADER_SUPPORT', true)
|
||||||
|
@ -112,7 +115,7 @@ if get_option('bindings').contains('wasm_beta')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#Log
|
#Log
|
||||||
if get_option('log')
|
if logging
|
||||||
config_h.set10('THORVG_LOG_ENABLED', true)
|
config_h.set10('THORVG_LOG_ENABLED', true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,11 @@ if cc.get_id() == 'clang-cl'
|
||||||
compiler_flags += ['/clang:-mfpu=neon']
|
compiler_flags += ['/clang:-mfpu=neon']
|
||||||
endif
|
endif
|
||||||
compiler_flags += ['/clang:-Wno-unknown-pragmas']
|
compiler_flags += ['/clang:-Wno-unknown-pragmas']
|
||||||
|
|
||||||
|
if logging == false
|
||||||
|
compiler_flags += ['/clang:-Wdouble-promotion']
|
||||||
|
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', '/clang:-Woverloaded-virtual',
|
compiler_flags += ['/clang:-fno-math-errno', '/clang:-Woverloaded-virtual',
|
||||||
|
@ -32,9 +37,14 @@ elif (cc.get_id() != 'msvc')
|
||||||
compiler_flags += ['-mfpu=neon']
|
compiler_flags += ['-mfpu=neon']
|
||||||
endif
|
endif
|
||||||
compiler_flags += ['-Wno-unknown-pragmas']
|
compiler_flags += ['-Wno-unknown-pragmas']
|
||||||
|
|
||||||
|
if logging == false
|
||||||
|
compiler_flags += ['-Wdouble-promotion']
|
||||||
|
endif
|
||||||
|
|
||||||
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', '-Woverloaded-virtual']
|
'-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-Woverloaded-virtual']
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue