Skip to content

Commit

Permalink
fix: do not define _LIBCPP_ABI_NAMESPACE=Cr for all native modules (#…
Browse files Browse the repository at this point in the history
…34944)

fix: do not define _LIBCPP_ABI_NAMESPACE=Cr for all native modules (#34932)

This define is only needed when linking against Chromiums libc++ which we currently
do not ship / expose the symbols of.  We probably should make those symbols visible and
actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++
but for now this fixes compilation issues on macOS where the default system clang links to the system libc++
which does not (obviously) use the Chromium ABI namespace.

For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner.

Co-authored-by: Samuel Attard <sam@electronjs.org>
  • Loading branch information
VerteDinde and MarshallOfSound committed Jul 18, 2022
1 parent 99724da commit 6fb73ba
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion patches/node/.patches
Expand Up @@ -44,4 +44,3 @@ src_update_importmoduledynamically.patch
fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch
json_parse_errors_made_user-friendly.patch
build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch
build_define_libcpp_abi_namespace_as_cr_to_align_with_chromium.patch

This file was deleted.

1 change: 1 addition & 0 deletions script/nan-spec-runner.js
Expand Up @@ -62,6 +62,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(' ');

Expand Down

0 comments on commit 6fb73ba

Please sign in to comment.