chore: fix architectures and endianness check

This commit is contained in:
SF-Zhou 2025-03-02 14:34:14 +08:00
parent 69c1aea220
commit 9ae2757720

View File

@ -8,8 +8,15 @@
#include <memory>
#include <string_view>
#include "folly/Portability.h"
namespace hf3fs {
#if !FOLLY_X64 && !FOLLY_AARCH64
#error "The platform must be 64bit!"
#endif
static_assert(std::endian::native == std::endian::little);
// `Status` imitates `abseil::Status` which contains:
// - code
// - (optional) message
@ -101,7 +108,6 @@ class [[nodiscard]] Status {
private:
static_assert(StatusCode::kOK == 0, "StatusCode::kOK must be 0!");
static_assert(__x86_64__, "The platform must be 64bit!");
static_assert(sizeof(status_code_t) == 2, "The width of status_code_t must be 16b");
static constexpr auto kPtrBits = 48u;