[gjs/mozjs102-msvc: 1/2] build: Require Visual Studio 2019 16.5.x or later




commit 8def5e1700d1ae0e4b79f08a6a13995eb811c1da
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Aug 2 16:06:56 2022 +0800

    build: Require Visual Studio 2019 16.5.x or later
    
    We need to use the newer preprocessor that has been made official in Visual
    Studio 2019 16.5.x or later in order to consume the Spidermonkey 102 headers.

 README.MSVC.md | 4 ++--
 meson.build    | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/README.MSVC.md b/README.MSVC.md
index b5f543495..df640ce4a 100644
--- a/README.MSVC.md
+++ b/README.MSVC.md
@@ -1,8 +1,8 @@
 Instructions for building GJS on Visual Studio or clang-cl
 ==========================================================
 Building the GJS on Windows is now supported using Visual Studio
-versions 2019 or later with or without clang-cl in both 32-bit and
-64-bit (x64) flavors, via Meson.  It should be noted that a
+versions 2019 16.5.x or later with or without clang-cl in both 32-bit
+and 64-bit (x64) flavors, via Meson.  It should be noted that a
 recent-enough Windows SDK from Microsoft is still required if using
 clang-cl, as we will still use items from the Windows SDK.
 
diff --git a/meson.build b/meson.build
index 55356a9c0..88192b2c4 100644
--- a/meson.build
+++ b/meson.build
@@ -40,6 +40,7 @@ if cc.get_id() == 'msvc'
     add_project_arguments(cxx.get_supported_arguments([
         '-utf-8',  # Use UTF-8 mode
         '/Zc:externConstexpr',  # Required for 'extern constexpr' on MSVC
+        '/Zc:preprocessor',     # Required to consume the mozjs-102 headers on MSVC
 
         # Ignore spurious compiler warnings for things that GLib and SpiderMonkey
         # header files commonly do


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