1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-24 18:00:55 +01:00

meson: Simplify asan-options handling even more

Instead of specifying env variables all the time
we can instead embed the __asan_default_options symbol
in all executables / shared objects. This reduces code
duplication.
This commit is contained in:
Sergei Zimmerman 2025-10-12 18:04:57 +03:00
parent d9cabddd17
commit 711e738bf9
No known key found for this signature in database
16 changed files with 12 additions and 26 deletions

View file

@ -5,13 +5,6 @@
using namespace nix;
extern "C" [[gnu::retain]] const char * __asan_default_options()
{
// We leak a bunch of memory knowingly on purpose. It's not worthwhile to
// diagnose that memory being leaked for now.
return "abort_on_error=1:print_summary=1:detect_leaks=0";
}
int main(int argc, char ** argv)
{
try {

View file

@ -1,11 +1,12 @@
cxx = meson.get_compiler('cpp')
deps_other = []
subdir('nix-meson-build-support/common/asan-options')
libstoreconsumer_tester = executable(
'test-libstoreconsumer',
'main.cc',
dependencies : [
dependencies : deps_other + [
dependency('nix-store'),
],
build_by_default : false,