Bläddra i källkod

Explicitly disable building for big endian.

Бранимир Караџић 2 år sedan
förälder
incheckning
610b8e4df1
1 ändrade filer med 7 tillägg och 0 borttagningar
  1. 7 0
      include/bx/platform.h

+ 7 - 0
include/bx/platform.h

@@ -461,6 +461,13 @@
 #	define BX_CPP_NAME "C++Unknown"
 #endif // defined(__cplusplus)
 
+#if BX_CPU_ENDIAN_BIG
+static_assert(false, "\n\n"
+	"\t** IMPORTANT! **\n\n"
+	"\tThe code was not tested for big endian, and big endian CPU is considered unsupported.\n"
+	"\t\n");
+#endif // BX_CPU_ENDIAN_BIG
+
 #if BX_PLATFORM_BSD   \
  || BX_PLATFORM_HAIKU \
  || BX_PLATFORM_HURD