summaryrefslogtreecommitdiff
path: root/zen/build_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/build_info.h')
-rw-r--r--zen/build_info.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/zen/build_info.h b/zen/build_info.h
index 5a1d1635..b06c1302 100644
--- a/zen/build_info.h
+++ b/zen/build_info.h
@@ -8,25 +8,25 @@
#define BUILD_INFO_H_5928539285603428657
-#define ZEN_ARCH_32BIT 32
-#define ZEN_ARCH_64BIT 64
- #ifdef __LP64__
- #define ZEN_BUILD_ARCH ZEN_ARCH_64BIT
- #else
- #define ZEN_BUILD_ARCH ZEN_ARCH_32BIT
- #endif
+namespace zen
+{
+enum class BuildArch
+{
+ bit32,
+ bit64,
-static_assert(ZEN_BUILD_ARCH == sizeof(void*) * 8);
+#ifdef __LP64__
+ program = bit64
+#else
+ program = bit32
+#endif
+};
+static_assert((BuildArch::program == BuildArch::bit32 ? 32 : 64) == sizeof(void*) * 8);
-namespace zen
-{
- #if ZEN_BUILD_ARCH == ZEN_ARCH_32BIT
- const char cpuArchName[] = "i686";
- #else
- const char cpuArchName[] = "x86-64";
- #endif
+
+constexpr const char* cpuArchName = BuildArch::program == BuildArch::bit32 ? "i686": "x86-64";
}
bgstack15