libstdc++: Make Asan detection work for Clang [PR103453]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 30 Nov 2021 13:14:38 +0000 (13:14 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 30 Nov 2021 20:10:19 +0000 (20:10 +0000)
commitcca6090b13ab503bef1cfa327e2d107789d6bd30
tree305a334b664a37dd1cb6a0870150ff7b778e17f3
parent36421e76a7150621f2a5c7060ddd3f80aa825a40
libstdc++: Make Asan detection work for Clang [PR103453]

Clang doesn't define __SANITIZE_ADDRESS__ so use its __has_feature check
to detect Asan instead.

libstdc++-v3/ChangeLog:

PR libstdc++/103453
* config/allocator/malloc_allocator_base.h
(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Define for Clang.
* config/allocator/new_allocator_base.h
(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Likewise.
libstdc++-v3/config/allocator/malloc_allocator_base.h
libstdc++-v3/config/allocator/new_allocator_base.h