mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Made Clang & GCC minimum supported version explicit.
This commit is contained in:
@@ -59,18 +59,13 @@
|
|||||||
# define BX_UNREACHABLE __builtin_unreachable()
|
# define BX_UNREACHABLE __builtin_unreachable()
|
||||||
# define BX_NO_VTABLE
|
# define BX_NO_VTABLE
|
||||||
# define BX_PRINTF_ARGS(_format, _args) __attribute__( (format(__printf__, _format, _args) ) )
|
# define BX_PRINTF_ARGS(_format, _args) __attribute__( (format(__printf__, _format, _args) ) )
|
||||||
|
# define BX_THREAD_LOCAL __thread
|
||||||
# if BX_CLANG_HAS_FEATURE(cxx_thread_local) \
|
|
||||||
|| (!BX_PLATFORM_OSX && (BX_COMPILER_GCC >= 40200) ) \
|
|
||||||
|| (BX_COMPILER_GCC >= 40500)
|
|
||||||
# define BX_THREAD_LOCAL __thread
|
|
||||||
# endif // BX_COMPILER_GCC
|
|
||||||
|
|
||||||
# define BX_ATTRIBUTE(_x) __attribute__( (_x) )
|
# define BX_ATTRIBUTE(_x) __attribute__( (_x) )
|
||||||
|
|
||||||
# if BX_CRT_MSVC
|
# if BX_CRT_MSVC
|
||||||
# define __stdcall
|
# define __stdcall
|
||||||
# endif // BX_CRT_MSVC
|
# endif // BX_CRT_MSVC
|
||||||
|
|
||||||
#elif BX_COMPILER_MSVC
|
#elif BX_COMPILER_MSVC
|
||||||
# define BX_ASSUME(_condition) __assume(_condition)
|
# define BX_ASSUME(_condition) __assume(_condition)
|
||||||
# define BX_ALIGN_DECL(_align, _decl) __declspec(align(_align) ) _decl
|
# define BX_ALIGN_DECL(_align, _decl) __declspec(align(_align) ) _decl
|
||||||
@@ -140,7 +135,7 @@
|
|||||||
# define BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG(_x)
|
# define BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG(_x)
|
||||||
#endif // BX_COMPILER_CLANG
|
#endif // BX_COMPILER_CLANG
|
||||||
|
|
||||||
#if BX_COMPILER_GCC && BX_COMPILER_GCC >= 40600
|
#if BX_COMPILER_GCC
|
||||||
# define BX_PRAGMA_DIAGNOSTIC_PUSH_GCC_() _Pragma("GCC diagnostic push")
|
# define BX_PRAGMA_DIAGNOSTIC_PUSH_GCC_() _Pragma("GCC diagnostic push")
|
||||||
# define BX_PRAGMA_DIAGNOSTIC_POP_GCC_() _Pragma("GCC diagnostic pop")
|
# define BX_PRAGMA_DIAGNOSTIC_POP_GCC_() _Pragma("GCC diagnostic pop")
|
||||||
# define BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC(_x) _Pragma(BX_STRINGIZE(GCC diagnostic ignored _x) )
|
# define BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC(_x) _Pragma(BX_STRINGIZE(GCC diagnostic ignored _x) )
|
||||||
|
|||||||
@@ -464,6 +464,22 @@
|
|||||||
//#error "Minimum supported macOS version is 16.00.\n"
|
//#error "Minimum supported macOS version is 16.00.\n"
|
||||||
#endif // BX_PLATFORM_OSX < 130000
|
#endif // BX_PLATFORM_OSX < 130000
|
||||||
|
|
||||||
|
#if BX_COMPILER_CLANG && BX_COMPILER_CLANG < 11000
|
||||||
|
// https://releases.llvm.org/
|
||||||
|
static_assert(false, "\n\n"
|
||||||
|
"\t** IMPORTANT! **\n\n"
|
||||||
|
"\tMinimum supported Clang version is 11.0 (October 12, 2020).\n");
|
||||||
|
"\t\n");
|
||||||
|
#endif // BX_COMPILER_*
|
||||||
|
|
||||||
|
#if BX_COMPILER_GCC && BX_COMPILER_GCC < 80400
|
||||||
|
// https://gcc.gnu.org/releases.html
|
||||||
|
static_assert(false, "\n\n"
|
||||||
|
"\t** IMPORTANT! **\n\n"
|
||||||
|
"\tMinimum supported GCC version is 8.4 (March 4, 2020).\n"
|
||||||
|
"\t\n");
|
||||||
|
#endif // BX_COMPILER_*
|
||||||
|
|
||||||
#if BX_CPU_ENDIAN_BIG
|
#if BX_CPU_ENDIAN_BIG
|
||||||
static_assert(false, "\n\n"
|
static_assert(false, "\n\n"
|
||||||
"\t** IMPORTANT! **\n\n"
|
"\t** IMPORTANT! **\n\n"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace bx
|
|||||||
int64_t i64 = int64_t(1000.0f * emscripten_get_now() );
|
int64_t i64 = int64_t(1000.0f * emscripten_get_now() );
|
||||||
#elif !BX_PLATFORM_NONE
|
#elif !BX_PLATFORM_NONE
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, 0);
|
gettimeofday(&now, NULL);
|
||||||
int64_t i64 = now.tv_sec*INT64_C(1000000) + now.tv_usec;
|
int64_t i64 = now.tv_sec*INT64_C(1000000) + now.tv_usec;
|
||||||
#else
|
#else
|
||||||
BX_ASSERT(false, "Not implemented!");
|
BX_ASSERT(false, "Not implemented!");
|
||||||
|
|||||||
Reference in New Issue
Block a user