Willy Tarreau | 909b9d8 | 2019-01-04 18:20:32 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Version reporting : all user-visible version information should come from |
| 3 | * this file so that rebuilding only this one is enough to report the latest |
| 4 | * code version. |
| 5 | */ |
| 6 | |
Olivier Houchard | b25970f | 2020-06-16 23:35:00 +0200 | [diff] [blame] | 7 | #include <haproxy/global.h> |
Willy Tarreau | d678805 | 2020-05-27 15:59:00 +0200 | [diff] [blame] | 8 | #include <haproxy/version.h> |
Willy Tarreau | 909b9d8 | 2019-01-04 18:20:32 +0100 | [diff] [blame] | 9 | |
Willy Tarreau | abefa34 | 2019-10-16 09:44:55 +0200 | [diff] [blame] | 10 | /* These ones are made variables and not constants so that they are stored into |
| 11 | * the data region and prominently appear in core files. |
| 12 | */ |
| 13 | char haproxy_version_here[] = "HAProxy version follows"; |
| 14 | char haproxy_version[] = HAPROXY_VERSION; |
| 15 | char haproxy_date[] = HAPROXY_DATE; |
| 16 | char stats_version_string[] = STATS_VERSION_STRING; |
Willy Tarreau | 88bd9ee | 2020-06-16 19:11:11 +0200 | [diff] [blame] | 17 | |
Willy Tarreau | 7bf484a | 2020-06-16 19:14:19 +0200 | [diff] [blame] | 18 | #if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) |
| 19 | #define SANITIZE_STRING " with address sanitizer" |
| 20 | #else |
| 21 | #define SANITIZE_STRING "" |
| 22 | #endif |
| 23 | |
Willy Tarreau | 88bd9ee | 2020-06-16 19:11:11 +0200 | [diff] [blame] | 24 | #if defined(__clang_version__) |
Willy Tarreau | 7bf484a | 2020-06-16 19:14:19 +0200 | [diff] [blame] | 25 | REGISTER_BUILD_OPTS("Built with clang compiler version " __clang_version__ "" SANITIZE_STRING); |
Willy Tarreau | 88bd9ee | 2020-06-16 19:11:11 +0200 | [diff] [blame] | 26 | #elif defined(__VERSION__) |
Willy Tarreau | 7bf484a | 2020-06-16 19:14:19 +0200 | [diff] [blame] | 27 | REGISTER_BUILD_OPTS("Built with gcc compiler version " __VERSION__ "" SANITIZE_STRING); |
Willy Tarreau | 88bd9ee | 2020-06-16 19:11:11 +0200 | [diff] [blame] | 28 | #endif |