nix-super/src/libutil
Jade Lovelace 2625e9fb0a 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.
2024-03-02 11:22:46 -08:00
..
args Fix nix shebang interaction with #8131 overhaul completions 2023-11-07 13:24:01 -05:00
signature Signer infrastructure: Prep for #9076 2024-01-03 16:13:55 -05:00
abstract-setting-to-json.hh Make toJSONObject const 2023-11-06 16:00:25 +01:00
ansicolor.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
archive.cc Get rid of CanonPath::fromCwd 2024-02-08 11:01:41 -05:00
archive.hh ParseSink -> FileSystemObjectSink 2024-01-22 18:01:18 -05:00
args.cc nix hash path, and preperatory refactors 2024-02-21 12:11:25 -05:00
args.hh nix hash path, and preperatory refactors 2024-02-21 12:11:25 -05: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 Factor out the Unix-specific parts of canonPathInner 2024-02-16 10:12:07 -05:00
canon-path.hh Purify CanonPath 2024-02-16 09:47:25 -05:00
cgroup.cc Separate SystemError from SysError 2024-01-12 12:00:33 -05: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 use std::tie() for macro-generated operators 2023-12-19 19:32:16 +01:00
compression.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05: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 Don't send settings that depend on disabled experimental features to the daemon 2024-02-20 15:28:42 +01:00
config.cc Don't send settings that depend on disabled experimental features to the daemon 2024-02-20 15:28:42 +01:00
config.hh Merge pull request #9233 from bouk/bouk/apply-config-inner 2023-12-01 08:23:32 -05:00
current-process.cc Rename hintfmt to HintFmt 2024-02-08 11:58:25 -08:00
current-process.hh Add missing #include for rlim_t 2024-01-26 22:34:31 -05:00
english.cc Unify and refactor value printing 2024-01-11 16:34:36 -08:00
english.hh Unify and refactor value printing 2024-01-11 16:34:36 -08:00
environment-variables.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
environment-variables.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
error.cc Remove the concept of "skipped frames" 2024-02-22 17:14:55 -08:00
error.hh Remove the concept of "skipped frames" 2024-02-22 17:14:55 -08:00
exit.cc :quit in the debugger should quit the whole program 2024-02-20 10:01:13 -08:00
exit.hh :quit in the debugger should quit the whole program 2024-02-20 10:01:13 -08:00
experimental-features.cc reword description for the fetch-tree experimental feature 2023-12-04 16:42:32 +01:00
experimental-features.hh Add the MountedSSHStore experimental feature 2023-11-21 13:16:46 -05:00
file-content-address.cc Fix gcc 12 warnings 2024-02-28 22:59:20 +01:00
file-content-address.hh Add Git object hashing to the store layer 2024-02-27 11:27:34 -05:00
file-descriptor.cc Remove C-style casts 2024-01-16 17:00:46 +00:00
file-descriptor.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
file-path-impl.hh Support Windows paths in canonPath and absPath 2024-02-16 10:31:36 -05:00
file-system.cc Support Windows paths in canonPath and absPath 2024-02-16 10:31:36 -05:00
file-system.hh absPath: just take a std::string_view 2024-01-15 08:21:54 -05:00
finally.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
fmt.hh Rename hintfmt to HintFmt 2024-02-08 11:58:25 -08:00
fs-sink.cc Revert "Remove dead Git code" 2024-02-27 06:39:30 +01:00
fs-sink.hh Revert "Remove dead Git code" 2024-02-27 06:39:30 +01:00
git.cc Support symlinks properly with git-hashing experimental feature 2024-02-28 12:24:45 -05:00
git.hh Support symlinks properly with git-hashing experimental feature 2024-02-28 12:24:45 -05:00
hash.cc treewide: hash type -> hash algorithm 2024-02-26 18:09:06 +08:00
hash.hh treewide: hash type -> hash algorithm 2024-02-26 18:09:06 +08: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
input-accessor.hh Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08: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) 2023-11-30 01:26:39 +00:00
local.mk Only link with -pthread on Unix 2024-01-10 20:38:39 -05:00
logging.cc libexpr: Support structured error classes 2024-02-01 16:39:38 -08:00
logging.hh Cleanup fmt.hh 2024-02-08 11:51:03 -08:00
lru-cache.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
memory-source-accessor.cc Improve the FileSystemObjectSink interface 2024-01-22 18:01:21 -05:00
memory-source-accessor.hh Improve the FileSystemObjectSink interface 2024-01-22 18:01:21 -05:00
monitor-fd.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
namespaces.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
namespaces.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
pool.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
position.cc Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08:00
position.hh Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08:00
posix-source-accessor.cc PosixSourceAccessor: Support roots that are not directories 2024-02-20 12:51:15 +01:00
posix-source-accessor.hh Get rid of CanonPath::fromCwd 2024-02-08 11:01:41 -05:00
processes.cc Remove C-style casts 2024-01-16 17:00:46 +00:00
processes.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
ref.hh Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08:00
references.cc Renamed HashFormat::Base32 to HashFormat::Nix32 2023-12-06 23:43:42 +01:00
references.hh HashType: Rename to HashAlgorithm 2023-12-06 23:43:42 +01:00
regex-combinators.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
repair-flag.hh Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08:00
serialise.cc Rename hintfmt to HintFmt 2024-02-08 11:58:25 -08:00
serialise.hh Use BackedStringView 2024-01-18 15:27:57 +01:00
signals.cc Don't use std::make_unique right before release 2024-01-16 17:00:46 +00:00
signals.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
source-accessor.cc HashType: Rename to HashAlgorithm 2023-12-06 23:43:42 +01:00
source-accessor.hh Get rid of CanonPath::fromCwd 2024-02-08 11:01:41 -05:00
source-path.cc Merge pull request #9985 from alois31/symlink-resolution 2024-02-16 09:24:03 -05:00
source-path.hh Merge pull request #9985 from alois31/symlink-resolution 2024-02-16 09:24:03 -05:00
split.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
suggestions.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05: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 Finish separating concerns with tarball cache 2024-02-15 10:34:01 -05:00
tarfile.hh Finish separating concerns with tarball cache 2024-02-15 10:34:01 -05:00
terminal.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
terminal.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
thread-pool.cc Make some more threads receive interrupts 2024-01-03 19:30:02 +01:00
thread-pool.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05: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
unix-domain-socket.cc bind: give same treatment as connect in #8544, dedup 2024-01-17 23:35:08 -05:00
unix-domain-socket.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
url-parts.hh Merge pull request #9621 from blaggacao/fix/too-restrictive-branch-regex-master 2023-12-22 16:02:25 +01:00
url.cc Merge remote-tracking branch 'origin/master' into profile-names-instead-of-index 2023-12-21 16:21:26 +01:00
url.hh isValidSchemeName: Add function 2023-12-11 12:12:43 +01:00
users.cc Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
users.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
util.cc Ban building Nix with NDEBUG 2024-03-02 11:22:46 -08:00
util.hh Improve String Handling 2024-01-16 17:00:46 +00: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