Fixed building SDL applications with Visual Studio and the clang toolset

Also fixed building 64-bit SDL with clang. 32-bit doesn't build because of the inline assembly for C runtime support.
This commit is contained in:
Sam Lantinga 2017-08-19 03:07:44 -07:00
parent 12d33b33ca
commit 30d554e3d6
4 changed files with 11 additions and 3 deletions

View file

@ -118,7 +118,7 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
* The compiler barrier prevents the compiler from reordering
* reads and writes to globally visible variables across the call.
*/
#if defined(_MSC_VER) && (_MSC_VER > 1200)
#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
void _ReadWriteBarrier(void);
#pragma intrinsic(_ReadWriteBarrier)
#define SDL_CompilerBarrier() _ReadWriteBarrier()