diff --git a/meson.build b/meson.build index 33621243..c1181da4 100644 --- a/meson.build +++ b/meson.build @@ -57,6 +57,9 @@ webp_loader = all_loaders or get_option('loaders').contains('webp') all_savers = get_option('savers').contains('all') gif_saver = all_savers or get_option('savers').contains('gif') or lottie2gif +#logging +logging = get_option('log') + #Loaders/savers/tools config if svg_loader config_h.set10('THORVG_SVG_LOADER_SUPPORT', true) @@ -112,7 +115,7 @@ if get_option('bindings').contains('wasm_beta') endif #Log -if get_option('log') +if logging config_h.set10('THORVG_LOG_ENABLED', true) endif diff --git a/src/meson.build b/src/meson.build index cd1052d5..101bf269 100644 --- a/src/meson.build +++ b/src/meson.build @@ -18,6 +18,11 @@ if cc.get_id() == 'clang-cl' compiler_flags += ['/clang:-mfpu=neon'] endif compiler_flags += ['/clang:-Wno-unknown-pragmas'] + + if logging == false + compiler_flags += ['/clang:-Wdouble-promotion'] + endif + if get_option('b_sanitize') == 'none' override_options += ['cpp_eh=none','cpp_rtti=false'] compiler_flags += ['/clang:-fno-math-errno', '/clang:-Woverloaded-virtual', @@ -32,9 +37,14 @@ elif (cc.get_id() != 'msvc') compiler_flags += ['-mfpu=neon'] endif compiler_flags += ['-Wno-unknown-pragmas'] + + if logging == false + compiler_flags += ['-Wdouble-promotion'] + endif + if get_option('b_sanitize') == 'none' 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