[CMake][ASAN] Add support for ADDRESS_SANITIZER_BUILD compile option
This commit introduces the `LLVM_ADDRESS_SANITIZER_BUILD` compile option that is set to indicate if LLVM has been built with ASAN enabled or not. This is a necessary addition to properly control the declarations of `__asan_*` helpers in header files. Previously, some of these declarations relied on `__has_feature(address_sanitizer)`, which can lead to differences between in-tree compilation units and down-stream usages of the same headers. The reproducer of this issue involved templates, which then lead to violation of the ODR due to having two different instances of the same template.
parent
dca32a3b
Please register or sign in to comment