diff options
Diffstat (limited to 'test/meson.build')
-rw-r--r-- | test/meson.build | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build index 05a54d5c..19726f37 100644 --- a/test/meson.build +++ b/test/meson.build @@ -7,6 +7,22 @@ endif test_enabled = true +# When ASan is enabled, find the path to the ASan runtime needed by multiple +# tests. This currently works with gcc only, as clang uses different file names +# depending on the compiler version and target architecture. +asan_enabled = false +asan_runtime_missing = false + +if get_option('b_sanitize').contains('address') + asan_enabled = true + + if cc.get_id() == 'gcc' + asan_runtime = run_command(cc, '-print-file-name=libasan.so', check : true).stdout().strip() + else + asan_runtime_missing = true + endif +endif + subdir('libtest') subdir('camera') |