Skip to content

Commit fd0a7b6

Browse files
committed
fix: disable C++ modules in libnode builds
1 parent ad52007 commit fd0a7b6

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

patches/node/.patches

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +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
55+
fix_redefined_macos_sdk_header_symbols.patch

patches/node/fix_js2c_including_mac_sdk_headers_twice.patch renamed to patches/node/fix_redefined_macos_sdk_header_symbols.patch

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22
From: Samuel Maddock <[email protected]>
33
Date: Wed, 8 Oct 2025 10:50:03 -0400
4-
Subject: fix: js2c including mac sdk headers twice
4+
Subject: fix: redefined macos sdk header symbols
55

66
https://chromium-review.googlesource.com/c/chromium/src/+/6950738
77

88
Chromium has set the minimum MacOS SDK version to 26. With this
99
change, it seems to introduce an incompatibility when compiling
10-
using clang modules. Disabling them seems to resolve the issue.
10+
using clang modules. Disabling them resolves the issue.
1111

1212
diff --git a/unofficial.gni b/unofficial.gni
13-
index a64d2e4ac475abc049fff7ea62ec76de565a747d..61aeac679a90832a1d9f559a4eb880362bce038d 100644
13+
index a64d2e4ac475abc049fff7ea62ec76de565a747d..ab456452d102088005fc4bfcb394d2de5ec44889 100644
1414
--- a/unofficial.gni
1515
+++ b/unofficial.gni
16-
@@ -350,6 +350,12 @@ template("node_gn_build") {
16+
@@ -195,6 +195,10 @@ template("node_gn_build") {
17+
"CoreFoundation.framework",
18+
"Security.framework",
19+
]
20+
+
21+
+ # Fix for MacOSX26 SDK headers included twice due to usage of clang
22+
+ # modules. Included once as a C header and again as C++.
23+
+ use_libcxx_modules = false
24+
}
25+
if (is_posix) {
26+
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
27+
@@ -350,6 +354,12 @@ template("node_gn_build") {
1728
include_dirs = [ "src", "tools" ]
1829
configs += [ "//build/config/compiler:no_exit_time_destructors" ]
1930

0 commit comments

Comments
 (0)