-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
Provide C++ ABI version to addons #2576
Copy link
Copy link
Closed
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Metadata
Metadata
Assignees
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Some platforms (most notably FreeBSD, MacOSX) use gcc or clang interchangeably. We no longer support compiler identification (#205), but what is needed for addons is know know which C++ library node has been compiled against.
At node-sass (https://github.com/sass/node-sass/blob/043c56705c663977468551206556d7f3c75ef9c1/src/libsass.gyp#L68) we were using
--stdlib=libc++clang option to force the use of Clang's C++ library but that is probably incorrect as this causes issues withnodeengines compiled against GNUlibstc++.so.6. (Example: fsevents/fsevents#82).FreeBSD 9 uses oldish GCC (4.2.1 by default) and we need to use some newer add-on compiler to get a decent C++11 support. But we don't know if the user compiles node with
libstdc++.so.6from gcc 4.8, 4.9 or maybe 5.0, or maybe with clang and links against itslibc++.It would be idea if C++ ABI information made its way into
config.gypiand into theprocess.configvariable.We would love to be able to provide different binary modules for different C++ library configurations (sass/node-sass#733).
Some additional links for reference: