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




commit fc79aaf5966ccc3846ae3dba0b0b436ba680aaf8
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 e9b69e91c..86c6bb44f 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]