Skip to content

Commit 39e2470

Browse files
committed
fix: js2c compilation failure
https://chromium-review.googlesource.com/c/chromium/src/+/6950738 See patch description explaining MacOS 26 SDK headers incompatibility.
1 parent 2a0b777 commit 39e2470

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

patches/node/.patches

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ chore_exclude_electron_node_folder_from_exit-time-destructors.patch
5252
api_remove_deprecated_getisolate.patch
5353
src_switch_from_get_setprototype_to_get_setprototypev2.patch
5454
fix_replace_deprecated_setprototype.patch
55+
fix_js2c_including_mac_sdk_headers_twice.patch
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Samuel Maddock <[email protected]>
3+
Date: Wed, 8 Oct 2025 10:50:03 -0400
4+
Subject: fix: js2c including mac sdk headers twice
5+
6+
https://chromium-review.googlesource.com/c/chromium/src/+/6950738
7+
8+
Chromium has set the minimum MacOS SDK version to 26. With this
9+
change, it seems to introduce an incompatibility when compiling
10+
using clang modules. Disabling them seems to resolve the issue.
11+
12+
diff --git a/unofficial.gni b/unofficial.gni
13+
index a64d2e4ac475abc049fff7ea62ec76de565a747d..61aeac679a90832a1d9f559a4eb880362bce038d 100644
14+
--- a/unofficial.gni
15+
+++ b/unofficial.gni
16+
@@ -350,6 +350,12 @@ template("node_gn_build") {
17+
include_dirs = [ "src", "tools" ]
18+
configs += [ "//build/config/compiler:no_exit_time_destructors" ]
19+
20+
+ # Fix for MacOSX26 SDK headers included twice due to usage of clang modules.
21+
+ # Included once as a C header and again as C++.
22+
+ if (is_mac) {
23+
+ use_libcxx_modules = false
24+
+ }
25+
+
26+
if (!is_win) {
27+
defines += [ "NODE_JS2C_USE_STRING_LITERALS" ]
28+
}

0 commit comments

Comments
 (0)