diff options
-rw-r--r-- | docs/markdown/snippets/debug-if-release-plain.md | 4 | ||||
-rw-r--r-- | mesonbuild/compilers/compilers.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/markdown/snippets/debug-if-release-plain.md b/docs/markdown/snippets/debug-if-release-plain.md new file mode 100644 index 0000000..013e6c8 --- /dev/null +++ b/docs/markdown/snippets/debug-if-release-plain.md @@ -0,0 +1,4 @@ +## n_debug=if-release and buildtype=plain means no asserts + +Previously if this combination was used then assertions were enabled, +which is fairly surprising behavior. diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index da02980..66195dc 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -510,7 +510,7 @@ def get_base_compile_args(options, compiler): try: if (options['b_ndebug'].value == 'true' or (options['b_ndebug'].value == 'if-release' and - options['buildtype'].value == 'release')): + options['buildtype'].value in {'release', 'plain'})): args += ['-DNDEBUG'] except KeyError: pass |