Merge remote-tracking branch 'bpay/clang-cl-build-fixes' into development

Conflicts:
	Engine/source/T3D/shapeBase.h
This commit is contained in:
Daniel Buckmaster 2015-07-17 16:55:12 +10:00
commit c2e5dc3345
17 changed files with 40 additions and 27 deletions

View file

@ -54,7 +54,17 @@ struct EmptyType {}; ///< "Null" type used by templates
//////////////////////////////////////////////////////////////////////////////////////////////////////////
typedef char UTF8; ///< Compiler independent 8 bit Unicode encoded character
#if defined(_MSC_VER) && defined(__clang__)
// Clang's MSVC compatibility mode doesn't currently support /Zc:wchar_t-,
// which we rely on to avoid type conversion errors when calling system
// APIs when UTF16 is defined as unsigned short. So, just define UTF16
// as wchar_t instead since it's always a 2 byte unsigned on windows anyway.
typedef wchar_t UTF16;
#else
typedef unsigned short UTF16; ///< Compiler independent 16 bit Unicode encoded character
#endif
typedef unsigned int UTF32; ///< Compiler independent 32 bit Unicode encoded character
typedef const char* StringTableEntry;

View file

@ -42,7 +42,7 @@ typedef unsigned _int64 U64;
#if _MSC_VER < 1200
// No support for old compilers
# error "VC: Minimum VisualC++ 6.0 or newer required"
#else _MSC_VER >= 1200
#else // _MSC_VER >= 1200
# define TORQUE_COMPILER_STRING "VisualC++"
#endif
@ -84,8 +84,10 @@ typedef unsigned _int64 U64;
# define TORQUE_CPU_STRING "x86"
# define TORQUE_CPU_X86
# define TORQUE_LITTLE_ENDIAN
#ifndef __clang__ // asm not yet supported with clang
# define TORQUE_SUPPORTS_NASM
# define TORQUE_SUPPORTS_VC_INLINE_X86_ASM
#endif
#elif defined( TORQUE_OS_XENON )
# define TORQUE_CPU_STRING "ppc"
# define TORQUE_CPU_PPC