lix/tests/unit/libstore
eldritch horrors 96a3683308 Ban building Nix with NDEBUG
When reviewing old PRs, I found that #9997 adds some code to ensure one
particular assert is always present. But, removing asserts isn't
something we do in our own release builds either in the flake here or in
nixpkgs, and is plainly a bad idea that increases support burden,
especially if other distros make bad choices of build flags in their Nix
packaging.

For context, the assert macro in the C standard is defined to do nothing
if NDEBUG is set.

There is no way in our build system to set -DNDEBUG without manually
adding it to CFLAGS, so this is simply a configuration we do not use.
Let's ban it at compile time.

I put this preprocessor directive in src/libutil.cc because it is not
obvious where else to put it, and it seems like the most logical file
since you are not getting a usable nix without it.

Upstream-PR: https://github.com/NixOS/nix/pull/10126
Original-Change-Id: I513cceaac1371decb3d96231e6ef9181c910c218
Change-Id: I531a51f6348a746e8e41d88203b08f614898356c
2024-03-04 09:24:58 +01:00
..
test-data Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
characterization.hh Merge pull request #9247 from obsidiansystems/derivation-test-with-files 2024-03-04 05:21:10 +01:00
common-protocol.cc Merge pull request #9247 from obsidiansystems/derivation-test-with-files 2024-03-04 05:21:10 +01:00
derivation.cc Merge pull request #9247 from obsidiansystems/derivation-test-with-files 2024-03-04 05:21:10 +01:00
derived-path.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
downstream-placeholder.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
local.mk Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
machines.cc Merge pull request #9841 from obsidiansystems/float-speed-factor 2024-03-04 08:40:38 +01:00
nar-info-disk-cache.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
outputs-spec.cc Ban building Nix with NDEBUG 2024-03-04 09:24:58 +01:00
path.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
protocol.hh Merge pull request #9247 from obsidiansystems/derivation-test-with-files 2024-03-04 05:21:10 +01:00
references.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
serve-protocol.cc Merge pull request #6223 from obsidiansystems/worker-proto-with-version 2024-03-04 04:59:31 +01:00
worker-protocol.cc Merge pull request #6223 from obsidiansystems/worker-proto-with-version 2024-03-04 04:59:31 +01:00