mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
ee3f25fada
Sanitizers require both front and backend support on the target platform. Detect whether applications can be compiled and linked with sanitizer support and enable sanitizers that can be both compiled and linked with. check_c_compiler_flags is insufficient here, because we need library support on top of just compiler support. This implicitly disables sanitizer support for most cross-compiling and embedded targets which use gcc or llvm based toolchains but don't have library support, while enabling it on MSVC and Intel compilers. While here, bind the sanitizer dependency to the zint library targets, and remove the hardcoded no-var-tracking-assignments. variable assignment tracking is a very powerful tool to find the true source of uninitialized value based conditional jumps, and, if undesired, it can be disabled by configuring the ASAN_OPTIONS environment variable.