MINOR: global: export the build features string list

Till now it was only presented in the version output but could not be
consulted outside of haproxy.c, let's export it as a variable, and set
it to an empty string if not defined.
This commit is contained in:
Willy Tarreau 2021-05-06 16:30:32 +02:00
parent 3e293a9135
commit f0d3b732fb
2 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include <haproxy/mworker-t.h>
#include <haproxy/vars-t.h>
extern const char *build_features;
extern struct global global;
extern int pid; /* current process id */
extern int relative_pid; /* process id starting at 1 */

View File

@ -148,6 +148,12 @@ DECLARE_INIT_STAGES;
*/
empty_t __read_mostly_align HA_SECTION("read_mostly") ALIGNED(64);
#ifdef BUILD_FEATURES
const char *build_features = BUILD_FEATURES;
#else
const char *build_features = "";
#endif
/* list of config files */
static struct list cfg_cfgfiles = LIST_HEAD_INIT(cfg_cfgfiles);
int pid; /* current process id */