From 5eacedd6d5727f7367f4298d20c3f83fd8e734c4 Mon Sep 17 00:00:00 2001 From: Matt Hargett Date: Fri, 5 Jun 2026 04:57:36 -0700 Subject: [PATCH 1/3] build: suppress MSVC C4875 from vendored GSL to unblock the Windows build windows-latest's newer MSVC promotes C4875 (deprecated non-string [[gsl::suppress]] arg) from the vendored GSL headers to an error under /WX, breaking every Win32/UWP build (pre-existing on main). Suppress the dependency-side deprecation. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 606b5bc1..b66dfa35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,14 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) +# A newer MSVC (windows-latest) emits C4875 ("a non-string literal argument to [[gsl::suppress]] is +# deprecated") from the vendored GSL headers, which several targets compile with warnings-as-error. +# Suppress this dependency-side deprecation so the Windows build isn't broken by toolchain drift. Must +# be set before arcana.cpp / Core / Polyfills are added below so they inherit it. +if(MSVC) + add_compile_options(/wd4875) +endif() + # -------------------------------------------------- # Options # -------------------------------------------------- From 12fbd518211056bfd60a137c9ae4332d1592005e Mon Sep 17 00:00:00 2001 From: Matt Hargett Date: Fri, 5 Jun 2026 05:09:06 -0700 Subject: [PATCH 2/3] Core/Node-API-JSI: add the shared napi include path (fixes pre-existing JSI C1083) The JSI napi target only had its own include/ on the include path, but napi.h includes the shared from Core/Node-API/Include/Shared (not built when the engine is JSI). Add that directory so the JSI backend compiles. Pre-existing failure (JSI was red on main with the same C1083); unblocks Win32/UWP JSI. --- Core/Node-API-JSI/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/Node-API-JSI/CMakeLists.txt b/Core/Node-API-JSI/CMakeLists.txt index e8e79a96..2b9ca89c 100644 --- a/Core/Node-API-JSI/CMakeLists.txt +++ b/Core/Node-API-JSI/CMakeLists.txt @@ -57,7 +57,12 @@ if(NOT TARGET jsi) endif() target_include_directories(napi - PUBLIC "include") + PUBLIC "include" + # napi.h pulls in the shared , which lives in + # Core/Node-API/Include/Shared. That sibling isn't built when the engine is JSI + # (Core/CMakeLists.txt selects Node-API-JSI instead of Node-API), so reference the shared + # headers directly here -- otherwise the JSI napi fails to compile with C1083. + PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../Node-API/Include/Shared") target_link_libraries(napi PUBLIC jsi) From b05a38a8f3d4dc173762c72dc7910cd623d37550 Mon Sep 17 00:00:00 2001 From: Matt Hargett Date: Fri, 5 Jun 2026 15:40:59 -0700 Subject: [PATCH 3/3] Address review: scope C4875 to C++ (COMPILE_LANGUAGE:CXX); single PUBLIC for JSI includes --- CMakeLists.txt | 7 +++++-- Core/Node-API-JSI/CMakeLists.txt | 13 +++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b66dfa35..b30926a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,9 +61,12 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # A newer MSVC (windows-latest) emits C4875 ("a non-string literal argument to [[gsl::suppress]] is # deprecated") from the vendored GSL headers, which several targets compile with warnings-as-error. # Suppress this dependency-side deprecation so the Windows build isn't broken by toolchain drift. Must -# be set before arcana.cpp / Core / Polyfills are added below so they inherit it. +# be set before arcana.cpp / Core / Polyfills are added below so they inherit it. Scoped to C++ (the +# warning only fires for GSL's C++ [[gsl::suppress]] attribute); kept directory-wide because GSL is +# pulled in transitively by many targets (arcana, AppRuntime, the polyfills) and no first-party code +# uses a non-string [[gsl::suppress]], so this doesn't mask our own warnings. if(MSVC) - add_compile_options(/wd4875) + add_compile_options($<$:/wd4875>) endif() # -------------------------------------------------- diff --git a/Core/Node-API-JSI/CMakeLists.txt b/Core/Node-API-JSI/CMakeLists.txt index 2b9ca89c..cb851d62 100644 --- a/Core/Node-API-JSI/CMakeLists.txt +++ b/Core/Node-API-JSI/CMakeLists.txt @@ -57,12 +57,13 @@ if(NOT TARGET jsi) endif() target_include_directories(napi - PUBLIC "include" - # napi.h pulls in the shared , which lives in - # Core/Node-API/Include/Shared. That sibling isn't built when the engine is JSI - # (Core/CMakeLists.txt selects Node-API-JSI instead of Node-API), so reference the shared - # headers directly here -- otherwise the JSI napi fails to compile with C1083. - PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../Node-API/Include/Shared") + PUBLIC + "include" + # napi.h pulls in the shared , which lives in + # Core/Node-API/Include/Shared. That sibling isn't built when the engine is JSI + # (Core/CMakeLists.txt selects Node-API-JSI instead of Node-API), so reference the shared + # headers directly here -- otherwise the JSI napi fails to compile with C1083. + "${CMAKE_CURRENT_SOURCE_DIR}/../Node-API/Include/Shared") target_link_libraries(napi PUBLIC jsi)