lix/src
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
..
build-remote Merge pull request #9838 from obsidiansystems/systemTypes-set 2024-03-04 08:39:24 +01:00
libcmd Merge pull request #9919 from 9999years/reduce-debugger-clutter 2024-03-04 08:52:57 +01:00
libexpr Merge pull request #9933 from pennae/debugger-fix 2024-03-04 08:57:44 +01:00
libfetchers Merge pull request #9445 from NixOS/allow-input-in-git-commit 2024-03-04 06:01:09 +01:00
libmain Merge pull request #9465 from obsidiansystems/build-dir 2024-03-04 07:11:25 +01:00
libstore Merge pull request #9992 from edolstra/fix-warning 2024-03-04 08:59:58 +01:00
libutil Ban building Nix with NDEBUG 2024-03-04 09:24:58 +01:00
nix Merge pull request #9930 from rvl/print-dev-env-unbound-variables 2024-03-04 08:51:49 +01:00
nix-build Merge pull request #9582 from pennae/misc-opts 2024-03-04 07:32:31 +01:00
nix-channel Merge pull request #9277 from keszybz/file-permissions 2024-03-04 05:26:17 +01:00
nix-collect-garbage Clean up a few things related to profiles (#8526) 2023-06-19 04:04:59 +00:00
nix-copy-closure Merge pull request #9277 from keszybz/file-permissions 2024-03-04 05:26:17 +01:00
nix-env Merge pull request #9582 from pennae/misc-opts 2024-03-04 07:32:31 +01:00
nix-instantiate Merge pull request #9582 from pennae/misc-opts 2024-03-04 07:32:31 +01:00
nix-store Merge pull request #6223 from obsidiansystems/worker-proto-with-version 2024-03-04 04:59:31 +01:00
resolve-system-dependencies Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00