[gjs/master.windows: 2/3] arg-cache.h: Fix building on clang-cl




commit 1ec0766c089a4fb28305a0d1158d22b5c0a2d2c5
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Aug 21 12:01:29 2020 +0800

    arg-cache.h: Fix building on clang-cl
    
    The check conditions for the size do not apply for `clang-cl` builds, since
    Windows is an LLP64 platform, so avoid doing the check when building with
    `clang-cl`, which does define `_MSC_VER` as it tries to emulate the Visual
    Studio compiler.

 gi/arg-cache.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gi/arg-cache.h b/gi/arg-cache.h
index a7223920..4a2d95fc 100644
--- a/gi/arg-cache.h
+++ b/gi/arg-cache.h
@@ -158,9 +158,11 @@ struct GjsArgumentCache {
 // template <int s> struct Measure;
 // Measure<sizeof(GjsArgumentCache)> arg_cache_size;
 
-#if defined(__x86_64__) && defined(__clang__)
+#if defined(__x86_64__) && defined(__clang__) && !defined (_MSC_VER)
 // This isn't meant to be comprehensive, but should trip on at least one CI job
-// if sizeof(GjsArgumentCache) is increased. */
+// if sizeof(GjsArgumentCache) is increased.
+// Note that this check is not applicable for clang-cl builds, as Windows is
+// an LLP64 system
 static_assert(sizeof(GjsArgumentCache) <= 104,
               "Think very hard before increasing the size of GjsArgumentCache. "
               "One is allocated for every argument to every introspected "


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]