mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-24 07:23:35 +00:00
Add word size detection to Platform.h
This commit is contained in:
parent
8f2050540d
commit
60ffbfc071
@ -27,4 +27,14 @@
|
||||
# error "Unsupported platform."
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64) || defined(__aarch64__) || defined(__x86_64__)
|
||||
# define NXT_PLATFORM_64_BIT 1
|
||||
static_assert(sizeof(sizeof(char)) == 8, "Expect sizeof(size_t) == 8");
|
||||
#elif defined(_WIN32) || defined(__i386__) || defined(__arm__)
|
||||
# define NXT_PLATFORM_32_BIT 1
|
||||
static_assert(sizeof(sizeof(char)) == 4, "Expect sizeof(size_t) == 4");
|
||||
#else
|
||||
# error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
#endif // COMMON_PLATFORM_H_
|
||||
|
Loading…
x
Reference in New Issue
Block a user