Bug 1255210 - Update OVR_ALIGNAS macro in ovr_capi_dynamic.h r=froydnj
authorKearwood (Kip) Gilbert <kgilbert@mozilla.com>
Wed, 28 Sep 2016 16:14:39 -0700
changeset 315796 878008bf7bec5df6244a9b9b7693821abea44dba
parent 315795 cf9d0c3c6f73486eb7c77233af8d980aa63a7cf4
child 315797 e77235072dd46edbdf8ae3ba564c1302e2730f89
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1255210
milestone52.0a1
Bug 1255210 - Update OVR_ALIGNAS macro in ovr_capi_dynamic.h r=froydnj - The updated OVR_ALIGNAS macro corrects errors blocking clang-cl builds. MozReview-Commit-ID: 20SMLNsia67
gfx/vr/ovr_capi_dynamic.h
--- a/gfx/vr/ovr_capi_dynamic.h
+++ b/gfx/vr/ovr_capi_dynamic.h
@@ -35,30 +35,22 @@
 
 #if defined(_WIN32)
 #define OVR_PFN __cdecl
 #else
 #define OVR_PFN
 #endif
 
 #if !defined(OVR_ALIGNAS)
-#if defined(__GNUC__) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 408) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L))
-#define OVR_ALIGNAS(n) alignas(n)
-#elif defined(__clang__) && !defined(__APPLE__) && (((__clang_major__ * 100) + __clang_minor__) >= 300) && (__cplusplus >= 201103L)
-#define OVR_ALIGNAS(n) alignas(n)
-#elif defined(__clang__) && defined(__APPLE__) && (((__clang_major__ * 100) + __clang_minor__) >= 401) && (__cplusplus >= 201103L)
-#define OVR_ALIGNAS(n) alignas(n)
-#elif defined(_MSC_VER) && (_MSC_VER >= 1900)
-#define OVR_ALIGNAS(n) alignas(n)
-#elif defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 408)
-#define OVR_ALIGNAS(n) alignas(n)
-#elif defined(__GNUC__) || defined(__clang__)
+#if defined(__GNUC__) || defined(__clang__)
 #define OVR_ALIGNAS(n) __attribute__((aligned(n)))
 #elif defined(_MSC_VER) || defined(__INTEL_COMPILER)
 #define OVR_ALIGNAS(n) __declspec(align(n))
+#elif defined(__CC_ARM)
+#define OVR_ALIGNAS(n) __align(n)
 #else
 #error Need to define OVR_ALIGNAS
 #endif
 #endif
 
 #if !defined(OVR_UNUSED_STRUCT_PAD)
 #define OVR_UNUSED_STRUCT_PAD(padName, size) char padName[size];
 #endif