diff --git a/patches/node/.patches b/patches/node/.patches index a175fc747271..17a4ed067136 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -43,6 +43,5 @@ macos_avoid_posix_spawnp_cwd_bug_3597.patch src_update_importmoduledynamically.patch fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch json_parse_errors_made_user-friendly.patch -build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch support_v8_sandboxed_pointers.patch build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch diff --git a/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch b/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch deleted file mode 100644 index 1c47ff5336b9..000000000000 --- a/patches/node/build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Mon, 6 Jun 2022 14:46:40 -0700 -Subject: build: define _LIBCPP_ABI_NAMESPACE as Cr to align with chromium - -Without this define native modules will be built trying to link to _LIBCPP_ABI_NAMESPACE which is the default name, chromium overrides this to Cr for PDB size reasons but they override it on all platforms. Setting this define allows native modules to actually work. This should not be upstreamed as it is Electron specific. - -Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3655638 - -diff --git a/common.gypi b/common.gypi -index bdfe81d11cc50f492c93fe48f6946765b6fb5238..559b7f7c220cb98946285bb15d0d63e203bbcea4 100644 ---- a/common.gypi -+++ b/common.gypi -@@ -288,6 +288,7 @@ - 'V8_DEPRECATION_WARNINGS', - 'V8_IMMINENT_DEPRECATION_WARNINGS', - '_GLIBCXX_USE_CXX11_ABI=1', -+ '_LIBCPP_ABI_NAMESPACE=Cr', - ], - - # Forcibly disable -Werror. We support a wide range of compilers, it's diff --git a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch index a38e4f9dec63..622e1cc6d2de 100644 --- a/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch +++ b/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch @@ -8,7 +8,7 @@ Aligns common.gypi with the current build flag state of //v8. Specifically enables `V8_ENABLE_SANDBOX`, `V8_SANDBOXED_POINTERS`, `V8_COMPRESS_POINTERS` and `V8_COMPRESS_POINTERS_IN_SHARED_CAGE`. diff --git a/common.gypi b/common.gypi -index 559b7f7c220cb98946285bb15d0d63e203bbcea4..ea87c9f56ef83e6b0edddb9a467a21eb4ea3907b 100644 +index bdfe81d11cc50f492c93fe48f6946765b6fb5238..ca08deeb19f5fe9ee399ad809b24579fdaa10036 100644 --- a/common.gypi +++ b/common.gypi @@ -65,6 +65,7 @@ @@ -27,7 +27,7 @@ index 559b7f7c220cb98946285bb15d0d63e203bbcea4..ea87c9f56ef83e6b0edddb9a467a21eb }], ['target_arch in "ppc64 s390x"', { 'v8_enable_backtrace': 1, -@@ -395,9 +397,15 @@ +@@ -394,9 +396,15 @@ ['v8_enable_pointer_compression == 1', { 'defines': [ 'V8_COMPRESS_POINTERS', diff --git a/script/nan-spec-runner.js b/script/nan-spec-runner.js index 8f14c6ef9bae..04c8459a085f 100644 --- a/script/nan-spec-runner.js +++ b/script/nan-spec-runner.js @@ -63,6 +63,7 @@ async function main () { `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++', 'trunk', 'include')}"`, `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++abi', 'trunk', 'include')}"`, '-fPIC', + '-D_LIBCPP_ABI_NAMESPACE=Cr', ...platformFlags ].join(' ');