增加自动版本标记脚本,从Tag中提取版本号,自动生成nm | grep VERSION方式查看的版本号。

This commit is contained in:
Lu Qiuwen
2018-10-11 20:08:22 +08:00
parent 72b931b02a
commit 70fbff5b7d
8 changed files with 1383 additions and 0 deletions

View File

@@ -45,6 +45,25 @@ struct tfe_proxy * g_default_proxy = NULL;
thread_local unsigned int __currect_thread_id = 0;
thread_local void * __currect_default_logger = NULL;
#define TFE_VAR_VERSION_CATTER(v) static __attribute__((__used__)) const char * TFE_VERSION_version_##v = NULL
#define TFE_VAR_VERSION_EXPEND(v) TFE_VAR_VERSION_CATTER(v)
/* VERSION TAG */
#ifdef TFE_VAR_VERSION
TFE_VAR_VERSION_EXPEND(TFE_VAR_VERSION);
#else
static __attribute__((__used__)) const char * TFE_VERSION_version_UNKNOWN = NULL;
#endif
#undef TFE_VAR_VERSION_CATTER
#undef TFE_VAR_VERSION_EXPEND
/* VERSION STRING */
#ifdef TFE_GIT_VERSION
static __attribute__((__used__)) const char * tfe_version = TFE_GIT_VERSION;
#else
static __attribute__((__used__)) const char * tfe_version = "Unknown";
#endif
struct tfe_thread_ctx * tfe_proxy_thread_ctx_acquire(struct tfe_proxy * ctx)
{
unsigned int min_thread_id = 0;