Skip to content

Commit

Permalink
build: use C++11 ABI with libstdc++
Browse files Browse the repository at this point in the history
This macro needs to match between Node.js and addons that use C++
standard library types whose ABI differs (e.g. `std::string`).
Therefore, a value for this should be specified in `common.gypi`.
(Currently, the 32-bit ARM builds use this ABI, and other
platforms don’t. It might also be possible to set this value to `0`
instead, it’s only important that *a* value is specified.)

Refs: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

PR-URL: #36634
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
addaleax authored and nodejs-github-bot committed Jan 4, 2021
1 parent d32a9fe commit a19af5e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
'defines': [
'V8_DEPRECATION_WARNINGS',
'V8_IMMINENT_DEPRECATION_WARNINGS',
'_GLIBCXX_USE_CXX11_ABI=1',
],

# Forcibly disable -Werror. We support a wide range of compilers, it's
Expand Down

0 comments on commit a19af5e

Please sign in to comment.