diff --git a/r5dev/mathlib/ssemath.h b/r5dev/mathlib/ssemath.h index 62c295cd..98091686 100644 --- a/r5dev/mathlib/ssemath.h +++ b/r5dev/mathlib/ssemath.h @@ -5942,7 +5942,7 @@ inline const fltx4 Normalized3SIMD(const fltx4 vec) // Some convenience operator overloads, which are just aliasing the functions above. // Unnecessary on 360, as you already have them from xboxmath.h // Component wise add -#ifndef COMPILER_GCC +#if !defined (COMPILER_GCC) && !defined (COMPILER_CLANG) FORCEINLINE fltx4 operator+=(fltx4& a, FLTX4 b) { diff --git a/r5dev/tier0/platform.h b/r5dev/tier0/platform.h index f3b90c9c..ca778c8b 100644 --- a/r5dev/tier0/platform.h +++ b/r5dev/tier0/platform.h @@ -5,9 +5,15 @@ #pragma intrinsic(__rdtsc) #endif - #define TIER0_DLL_EXPORT -#define COMPILER_MSVC + +#ifdef _MSC_VER +#define COMPILER_MSVC 1 // !TODO: Set in CMake! +#endif // _MSC_VER + +#ifdef __clang__ +#define COMPILER_CLANG 1 // !TODO: Set in CMake! +#endif // __clang__ //----------------------------------------------------------------------------- // Set up platform defines. @@ -133,6 +139,11 @@ #define GNUC 1 #endif +#ifdef COMPILER_CLANG +#define CLANG 1 +#define POSIX_MATH 1 +#endif + #if defined( _WIN32 ) #define _WINDOWS 1 #endif