1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-25 23:43:49 +00:00

Merge pull request #7331 from ThomasWaldmann/undefine-ndebug-master

undef NDEBUG for chunker and hashindex
This commit is contained in:
TW 2023-02-09 21:52:20 +01:00 committed by GitHub
commit 79d6835738
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -186,12 +186,14 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version, lib_s
dict(extra_compile_args=cflags), 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 += [ ext_modules += [
Extension("borg.crypto.low_level", **crypto_ext_kwargs), Extension("borg.crypto.low_level", **crypto_ext_kwargs),
Extension("borg.compress", **compress_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.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), Extension("borg.checksums", **checksums_ext_kwargs),
] ]