Commit aa2a5abf authored by Christian Ulmann's avatar Christian Ulmann
Browse files

[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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment