Detect ASAN when using older GCC versions
Newer GCCs have __has_feature and older ones have __SANITIZE_ADDRESS__[1]. Relevant since ASAN with GCC 11 on the popular Ubuntu Jammy failed to build previously. [1]: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/cpp/Common-Predefined-Macros.html
This commit is contained in:
parent
0a99daa321
commit
2102fe32ff
@ -16,7 +16,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
|
||||
# if __has_feature(address_sanitizer)
|
||||
# if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
||||
# define RUBY_ASAN_ENABLED
|
||||
# include <sanitizer/asan_interface.h>
|
||||
# endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user