blob: e7bb748f81e577ae46984a85c02c0e6792111e8b [file] [log] [blame]
Willy Tarreau909b9d82019-01-04 18:20:32 +01001/*
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 Houchardb25970f2020-06-16 23:35:00 +02007#include <haproxy/global.h>
Willy Tarreaud6788052020-05-27 15:59:00 +02008#include <haproxy/version.h>
Willy Tarreau909b9d82019-01-04 18:20:32 +01009
Willy Tarreauabefa342019-10-16 09:44:55 +020010/* 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 */
13char haproxy_version_here[] = "HAProxy version follows";
14char haproxy_version[] = HAPROXY_VERSION;
15char haproxy_date[] = HAPROXY_DATE;
16char stats_version_string[] = STATS_VERSION_STRING;
Willy Tarreau88bd9ee2020-06-16 19:11:11 +020017
Willy Tarreau7bf484a2020-06-16 19:14:19 +020018#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 Tarreau88bd9ee2020-06-16 19:11:11 +020024#if defined(__clang_version__)
Willy Tarreau7bf484a2020-06-16 19:14:19 +020025REGISTER_BUILD_OPTS("Built with clang compiler version " __clang_version__ "" SANITIZE_STRING);
Willy Tarreau88bd9ee2020-06-16 19:11:11 +020026#elif defined(__VERSION__)
Willy Tarreau7bf484a2020-06-16 19:14:19 +020027REGISTER_BUILD_OPTS("Built with gcc compiler version " __VERSION__ "" SANITIZE_STRING);
Willy Tarreau88bd9ee2020-06-16 19:11:11 +020028#endif