2019-01-04 12:20:32 -05:00
|
|
|
/*
|
|
|
|
|
* Version reporting : all user-visible version information should come from
|
|
|
|
|
* this file so that rebuilding only this one is enough to report the latest
|
|
|
|
|
* code version.
|
|
|
|
|
*/
|
|
|
|
|
|
2020-06-16 17:35:00 -04:00
|
|
|
#include <haproxy/global.h>
|
2020-05-27 09:59:00 -04:00
|
|
|
#include <haproxy/version.h>
|
2019-01-04 12:20:32 -05:00
|
|
|
|
2019-10-16 03:44:55 -04:00
|
|
|
/* These ones are made variables and not constants so that they are stored into
|
|
|
|
|
* the data region and prominently appear in core files.
|
|
|
|
|
*/
|
|
|
|
|
char haproxy_version_here[] = "HAProxy version follows";
|
|
|
|
|
char haproxy_version[] = HAPROXY_VERSION;
|
|
|
|
|
char haproxy_date[] = HAPROXY_DATE;
|
|
|
|
|
char stats_version_string[] = STATS_VERSION_STRING;
|
2020-06-16 13:11:11 -04:00
|
|
|
|
2025-01-20 11:49:55 -05:00
|
|
|
/* the build options string depending on known settings */
|
|
|
|
|
char build_opts_string[] = ""
|
|
|
|
|
#ifdef BUILD_TARGET
|
|
|
|
|
"\n TARGET = " BUILD_TARGET
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef BUILD_CC
|
|
|
|
|
"\n CC = " BUILD_CC
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef BUILD_CFLAGS
|
|
|
|
|
"\n CFLAGS = " BUILD_CFLAGS
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef BUILD_OPTIONS
|
|
|
|
|
"\n OPTIONS = " BUILD_OPTIONS
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef BUILD_DEBUG
|
|
|
|
|
"\n DEBUG = " BUILD_DEBUG
|
|
|
|
|
#endif
|
|
|
|
|
"";
|
|
|
|
|
|
|
|
|
|
/* compact string of toolchain options for post-mortem */
|
|
|
|
|
const char pm_toolchain_opts[] = ""
|
|
|
|
|
#ifdef BUILD_CC
|
|
|
|
|
BUILD_CC
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef BUILD_CFLAGS
|
|
|
|
|
" " BUILD_CFLAGS
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef BUILD_DEBUG
|
|
|
|
|
" " BUILD_DEBUG
|
|
|
|
|
#endif
|
|
|
|
|
"";
|
|
|
|
|
|
|
|
|
|
/* compact string of target options for post-mortem */
|
|
|
|
|
const char pm_target_opts[] = ""
|
|
|
|
|
#ifdef BUILD_TARGET
|
|
|
|
|
"TARGET='" BUILD_TARGET "'"
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef BUILD_OPTIONS
|
|
|
|
|
" " BUILD_OPTIONS
|
|
|
|
|
#endif
|
|
|
|
|
"";
|
|
|
|
|
|
|
|
|
|
/* Build features may be passed by the makefile */
|
|
|
|
|
#ifdef BUILD_FEATURES
|
|
|
|
|
char *build_features = BUILD_FEATURES;
|
|
|
|
|
#else
|
|
|
|
|
char *build_features = "";
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-06-16 13:14:19 -04:00
|
|
|
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
|
|
|
|
#define SANITIZE_STRING " with address sanitizer"
|
|
|
|
|
#else
|
|
|
|
|
#define SANITIZE_STRING ""
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-06-16 13:11:11 -04:00
|
|
|
#if defined(__clang_version__)
|
2020-06-16 13:14:19 -04:00
|
|
|
REGISTER_BUILD_OPTS("Built with clang compiler version " __clang_version__ "" SANITIZE_STRING);
|
2020-06-16 13:11:11 -04:00
|
|
|
#elif defined(__VERSION__)
|
2020-06-16 13:14:19 -04:00
|
|
|
REGISTER_BUILD_OPTS("Built with gcc compiler version " __VERSION__ "" SANITIZE_STRING);
|
2020-06-16 13:11:11 -04:00
|
|
|
#endif
|