summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2023-02-09 20:59:14 +0100
committerThomas Waldmann <tw@waldmann-edv.de>2023-02-09 21:01:03 +0100
commit311ac55ebda45aaa2d93b5a41d98c439caa961bf (patch)
treeb6dc0d52671178bba2d3b5b8e8d1871080105e12 /setup.py
parent2b2586a0983f0a05b5548f2e1b935f78bf14ca0c (diff)
undef NDEBUG for chunker and hashindex
note: intentionally not undef'ing it for all the cython-only generated C code.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 157be2c32..95d180c65 100644
--- a/setup.py
+++ b/setup.py
@@ -186,12 +186,14 @@ if not on_rtd:
dict(extra_compile_args=cflags),
)
+ # note: _chunker.c and _hashindex.c are relatively complex/large pieces of handwritten C code,
+ # thus we undef NDEBUG for them, so the compiled code will contain and execute assert().
ext_modules += [
Extension("borg.crypto.low_level", **crypto_ext_kwargs),
Extension("borg.compress", **compress_ext_kwargs),
- Extension("borg.hashindex", [hashindex_source], extra_compile_args=cflags),
+ Extension("borg.hashindex", [hashindex_source], extra_compile_args=cflags, undef_macros=["NDEBUG"]),
Extension("borg.item", [item_source], extra_compile_args=cflags),
- Extension("borg.chunker", [chunker_source], extra_compile_args=cflags),
+ Extension("borg.chunker", [chunker_source], extra_compile_args=cflags, undef_macros=["NDEBUG"]),
Extension("borg.checksums", **checksums_ext_kwargs),
]