diff options
author | Dave Barach <openvpp@barachs.net> | 2015-12-14 16:37:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@projectrotterdam.info> | 2015-12-14 16:37:16 +0000 |
commit | ee4e9ec5b3d94c580329ee8fa98304055be052fe (patch) | |
tree | f0af7dceff429c71cca0b391316a72a6fe10ea8a | |
parent | 99d8c76a59908713d7a8376ac1939c34492249af (diff) | |
parent | 5a7a5c7bac83b641d43b4fcd70ee52567530d407 (diff) |
Merge "add compiler information to "show version" cli"
-rw-r--r-- | vpp/app/version.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vpp/app/version.c b/vpp/app/version.c index f6aaa0be..9949b138 100644 --- a/vpp/app/version.c +++ b/vpp/app/version.c @@ -22,6 +22,21 @@ static char * vpe_version_string = " at " VPP_BUILD_DATE; static char * vpe_dir_string = "Built in " VPP_BUILD_TOPDIR; +static char * vpe_compiler = "Compiled with " +#if defined(__INTEL_COMPILER) +#define __(x) #x +#define _(x) __(x) + "icc " _(__INTEL_COMPILER) " (" __VERSION__ ")"; +#undef _ +#undef __ +#elif defined(__clang__) + "Clang/LLVM " __clang_version__; +#elif defined (__GNUC__) + "GCC " __VERSION__; +#else + "unknown compiler"; +#endif + static clib_error_t * show_vpe_version_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -30,6 +45,7 @@ show_vpe_version_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%s", vpe_version_string); if (unformat (input, "verbose")){ vlib_cli_output (vm, "%s", vpe_dir_string); + vlib_cli_output (vm, "%s", vpe_compiler); } return 0; } |