0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 23:40:57 +01:00

ircd::info: Additional string for compiler name; architecture related.

This commit is contained in:
Jason Volk 2020-09-29 00:12:12 -07:00
parent 1bb6c2dcd0
commit 88808f597a
2 changed files with 34 additions and 1 deletions

View file

@ -41,6 +41,7 @@ namespace ircd::info
extern const time_t configured_time; extern const time_t configured_time;
extern const string_view configured; extern const string_view configured;
extern const string_view compiled; extern const string_view compiled;
extern const string_view compiler;
// Toolchain and library information // Toolchain and library information
extern const versions gnuc_version; extern const versions gnuc_version;
@ -83,6 +84,8 @@ namespace ircd::info
namespace ircd::info::hardware namespace ircd::info::hardware
{ {
extern const string_view arch;
extern const string_view endian;
extern const size_t max_align; extern const size_t max_align;
extern const size_t hardware_concurrency; extern const size_t hardware_concurrency;
extern const size_t destructive_interference; extern const size_t destructive_interference;

View file

@ -515,6 +515,30 @@ noexcept
// Generic / Standard // Generic / Standard
// //
decltype(ircd::info::hardware::arch)
ircd::info::hardware::arch
{
#if defined(__x86_64__)
"x86_64"
#elif defined(__aarch64__)
"aarch64"
#else
"undefined"
#endif
};
decltype(ircd::info::hardware::endian)
ircd::info::hardware::endian
{
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
"big"
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
"little"
#else
"undefined"
#endif
};
decltype(ircd::info::hardware::max_align) decltype(ircd::info::hardware::max_align)
ircd::info::hardware::max_align ircd::info::hardware::max_align
{ {
@ -1047,7 +1071,7 @@ ircd::info::dump_lib_info()
log::info log::info
{ {
log::star, "%s SD-6 %s. glibcxx %s. glibc %s. boost %s. RocksDB %s. sodium %s. %s. magic %ld.", log::star, "%s SD-6 %s. glibcxx %s. glibc %s. boost %s. RocksDB %s. sodium %s. %s. magic %ld.",
string_view{RB_CXX}, string_view{compiler},
string_view{sd6_version}, string_view{sd6_version},
string_view{glibcxx_version_api}, string_view{glibcxx_version_api},
string_view{glibc_version_api}, string_view{glibc_version_api},
@ -1071,6 +1095,12 @@ ircd::info::dump_lib_info()
}; };
} }
decltype(ircd::info::compiler)
ircd::info::compiler
{
split(RB_CXX, ' ').first
};
// //
// gnuc // gnuc
// //