lix/src/libutil
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
..
abstract-setting-to-json.hh Merge pull request #9299 from tfc/config-improvements 2024-03-04 05:36:42 +01:00
ansicolor.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
archive.cc Merge pull request #9673 from pennae/drv-parse-opts 2024-03-04 07:36:51 +01:00
archive.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
args.cc Merge pull request #8931 from fricklerhandwerk/nix3-config-options 2024-03-04 04:35:54 +01:00
args.hh Merge pull request #9167 from obsidiansystems/pre-overhaul-completions 2024-03-04 04:38:33 +01:00
callback.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
canon-path.cc Backport SourcePath from the lazy-trees branch 2023-04-06 13:15:50 +02:00
canon-path.hh Merge remote-tracking branch 'upstream/master' into source-path 2023-04-17 11:41:50 +02:00
cgroup.cc Clean up cgroup handling in getMaxCPU() 2022-12-02 12:59:13 +01:00
cgroup.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
chunked-vector.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
closure.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
comparator.hh Merge pull request #9582 from pennae/misc-opts 2024-03-04 07:32:31 +01:00
compression.cc Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
compression.hh Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
compute-levels.cc Add x86_64 compute levels as additional system types 2021-02-22 09:11:15 +01:00
compute-levels.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
config-impl.hh Merge pull request #9299 from tfc/config-improvements 2024-03-04 05:36:42 +01:00
config.cc Merge pull request #9233 from bouk/bouk/apply-config-inner 2024-03-04 07:11:25 +01:00
config.hh Merge pull request #9233 from bouk/bouk/apply-config-inner 2024-03-04 07:11:25 +01:00
error.cc Merge pull request #9617 from 9999years/stack-overflow-segfault 2024-03-04 07:35:20 +01:00
error.hh Merge pull request #9617 from 9999years/stack-overflow-segfault 2024-03-04 07:35:20 +01:00
experimental-features.cc Stabilize discard-references 2023-08-07 16:53:37 +02:00
experimental-features.hh Stabilize discard-references 2023-08-07 16:53:37 +02:00
filesystem.cc Remove dead code (#8504) 2023-06-14 14:09:11 -04:00
finally.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
fmt.hh Merge pull request #9924 from 9999years/rename-yellowtxt 2024-03-04 08:53:10 +01:00
git.cc Fix the parsing of the sourcehut refs file 2022-05-04 14:38:59 +02:00
git.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
hash.cc Merge pull request #7732 from hercules-ci/make-initLibStore-viable-alternative 2023-04-17 08:04:41 -04:00
hash.hh Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
hilite.cc Fix incorrect comment in hiliteMatches 2022-06-05 20:30:18 +02:00
hilite.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
json-impls.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
json-utils.cc Fix derivation load assertion errors 2023-08-05 01:34:30 +02:00
json-utils.hh fix: nlohmann::adl_serializer for std::optional (#9147) 2024-03-04 07:11:25 +01:00
local.mk Remove the explicit c++fs linkage on darwin 2022-08-08 14:34:22 +02:00
logging.cc Print parent activity field in json log 2023-09-09 18:01:10 +02:00
logging.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
lru-cache.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
monitor-fd.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
namespaces.cc Simplify the PID namespace check: just try to mount /proc 2023-02-10 14:38:14 +01:00
namespaces.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
pool.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
ref.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
references.cc Don't assume the type of string::size_type 2023-06-15 21:24:14 +02:00
references.hh Don't assume the type of string::size_type 2023-06-15 21:24:14 +02:00
regex-combinators.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
serialise.cc Merge pull request #9798 from edolstra/remote-store-eof 2024-03-04 08:12:15 +01:00
serialise.hh Merge pull request #9798 from edolstra/remote-store-eof 2024-03-04 08:12:15 +01:00
split.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
suggestions.cc Implement operator<< for Suggestions 2022-03-07 10:09:10 +01:00
suggestions.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
sync.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
tarfile.cc Merge pull request #9557 from bryanhonof/bryanhonof.fix-apple-double-shenanigans 2024-03-04 07:11:25 +01:00
tarfile.hh TarArchive: Remove a duplicate constant and increase the buffer size 2023-04-25 16:43:10 +02:00
thread-pool.cc Merge pull request #9687 from edolstra/withFramedSink-ctrl-c-hang 2024-03-04 07:40:17 +01:00
thread-pool.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
topo-sort.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
types.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
url-parts.hh Merge pull request #9621 from blaggacao/fix/too-restrictive-branch-regex-master 2024-03-04 07:27:52 +01:00
url.cc libutil: fix double-encoding of URLs 2023-08-17 14:16:19 -07:00
url.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
util.cc Ban building Nix with NDEBUG 2024-03-04 09:24:58 +01:00
util.hh Remove dead code (#8504) 2023-06-14 14:09:11 -04:00
variant-wrapper.hh Fixing #7479 2023-08-18 11:44:00 -04:00
xml-writer.cc xml-writer: Remove std aliases 2022-02-25 16:13:02 +01:00
xml-writer.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00