You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I want to enable the sanitizers in debug only. How would I acchive this? The method I tried doesn't work and I can't find any references in the manual or online.
This is what I am trying to do:
project(
'Foo',
'c',
version: '0.0.1',
license: 'GPL-3.0-or-later',
meson_version: '>= 0.64.0',
default_options: [
'c_std=c2x',
'warning_level=everything',
],
)
# This is the relevant partifget_option('buildtype').startswith('debug')
message('Building a debug release')
add_project_arguments('b_sanitize=address,undefined', language: 'c')
elseadd_project_arguments(['werror=true'], language: 'c')
endif
ce_sources = file('src/main.c')
executable(
meson.project_name().to_lower(),
ce_sources,
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey, I want to enable the sanitizers in debug only. How would I acchive this? The method I tried doesn't work and I can't find any references in the manual or online.
This is what I am trying to do:
Meson tries to add it as a link argument
Beta Was this translation helpful? Give feedback.
All reactions