llvm-project
aa2a5abf - [CMake][ASAN] Add support for ADDRESS_SANITIZER_BUILD compile option

Commit
1 year ago
[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.
Author
Parents
Loading