mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: version: report the presence of the compiler's address sanitizer
Since we've seen clang emit bad code when the address sanitizer is enabled at -O2, better clearly report it in the version output. It is detected both for clang and gcc (both tested with and without).
This commit is contained in:
parent
6d4c81db96
commit
7bf484ac91
@ -14,8 +14,14 @@ char haproxy_version[] = HAPROXY_VERSION;
|
||||
char haproxy_date[] = HAPROXY_DATE;
|
||||
char stats_version_string[] = STATS_VERSION_STRING;
|
||||
|
||||
#if defined(__clang_version__)
|
||||
REGISTER_BUILD_OPTS("Built with clang compiler version " __clang_version__);
|
||||
#elif defined(__VERSION__)
|
||||
REGISTER_BUILD_OPTS("Built with gcc compiler version " __VERSION__);
|
||||
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
||||
#define SANITIZE_STRING " with address sanitizer"
|
||||
#else
|
||||
#define SANITIZE_STRING ""
|
||||
#endif
|
||||
|
||||
#if defined(__clang_version__)
|
||||
REGISTER_BUILD_OPTS("Built with clang compiler version " __clang_version__ "" SANITIZE_STRING);
|
||||
#elif defined(__VERSION__)
|
||||
REGISTER_BUILD_OPTS("Built with gcc compiler version " __VERSION__ "" SANITIZE_STRING);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user