Core: Fix ASAN on Clang-14 / Linux #106675

Merged
Sybren A. Stüvel merged 1 commits from dr.sybren/blender:core/clang-asan-compat into main 2023-04-11 14:15:47 +02:00

1 Commits

Author SHA1 Message Date
Sybren A. Stüvel 32df4b0793 Core: Fix ASAN on Clang-14 / Linux
buildbot/vexp-code-patch-coordinator Build done. Details
When using ASAN on Clang / Linux, the call to `find_library(... asan ...)`
works against us, as it finds GCC's `libasan.so`. To work with Clang,
we should simply not pass any explicit library, as Clang will figure things
out by itself with the `-fsanitize=xxx` options.

Furthermore, Clang is incompatible with `-fsanitize=object-size`, so that's
now also no longer passed on Linux (mimicking the Apple) configuration.

For the long run, it would be better to rewrite this entire section to
select behaviour on a per-compiler basis, rather than per platform. That's
tracked in #105956
2023-04-07 16:42:24 +02:00